nou

#include in kernel and structure alignment

Discussion created by nou on Nov 17, 2009
Latest reply on Nov 19, 2009 by omkaranathan

i found a great feature which isnt make it clear in specification. in section 5.4.3.1 there are option -I. i call clBuildProgram(.., "-I.", ); and in kernel have #include "header.cl". and it work.

another thing. in release notes is stated that every element of structure must be aligned to float4. but i write struct and i get sizeof() that structure is 324 byte. which is exactly the sum size of data types in the struct. i tested it only on CPU. is on GPU some restriction in alignment?

second thing in release note is that array in struct is not supported. but for me it worked.

Outcomes