i use follow code set , clear bit of unsigned long long in kernel void in opencl
a1 |= 1ll << 2 * i; // = 9 , set bit 18 =1, a1 long long int a1 &= ~(1ll << 2 * + 1); //clear bit 19 = 0
my code run in cuda, in opencl, has error cl_out_of_host_memory in buildprogram. if use
a1 |= 1 << 2 * i; // = 9 , set bit 18 =1, a1 long long int a1 &= ~(1 << 2 * + 1); //clear bit 19 = 0
it run fine result wrong because can't set bit of long long number. can me!
the data type long long
reserved keyword future extensions in opencl 2.0 (and in 2.1 too). cannot use it, there no implementation possible.
see: https://www.khronos.org/registry/cl/sdk/2.0/docs/man/xhtml/reserveddatatypes.html
Comments
Post a Comment