Anastasia added a comment.

In https://reviews.llvm.org/D35000#807674, @echuraev wrote:

> In https://reviews.llvm.org/D35000#801132, @Anastasia wrote:
>
> > In https://reviews.llvm.org/D35000#799705, @Anastasia wrote:
> >
> > > Btw, is there any reason to add testing specifically for half? Is there 
> > > anything specific to half in the implementation of this?
> >
> >
> > Trying to understand the reason for this change though...
>
>
> Sorry for a delay in response. No it is not any reason to add testing 
> specifically for half. We can also do the same tests for other data types. 
> Here we just check that it is no any qualifiers in metadata.


Btw, if I read the spec then it feels like we should put the qualifiers of the 
pointee type instead:

`CL_KERNEL_ARG_TYPE_VOLATILE` is returned if the argument is a pointer and the 
referenced type is declared with the `volatile` qualifier. For example, a 
kernel argument declared as `global int volatile *x` returns 
`CL_KERNEL_ARG_TYPE_VOLATILE` but a kernel argument declared as `global int 
*volatile x` does not. Similarly, `CL_KERNEL_ARG_TYPE_RESTRICT` or 
`CL_KERNEL_ARG_TYPE_CONST` is returned if the argument is a pointer and the 
referenced type is declared with the `restrict` or `const` qualifier. For 
example, a kernel argument declared as `global int const *x` returns 
`CL_KERNEL_ARG_TYPE_CONST` but a kernel argument declared as `global int *const 
x` does not.

It seems that the function `foo` is attempting to test that too. Perhaps we 
could unify the testing and create all combinations of pointer and non pointer 
types which would have qualifier and not.

I don't feel that we should test all possible types though...


https://reviews.llvm.org/D35000



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to