diapolo

kernel output-buffer as ulong (64-Bit)?

Discussion created by diapolo on Aug 18, 2011
Latest reply on Aug 22, 2011 by diapolo

Is it allowed to write into global memory if it is defined as __global ulong *? I want to pack 2 uints into 1 ulong and write this in global memory and reverse this in the host application.

const ulong a = (ulong)(Var1 << 32);
const ulong b = ((Var2 & 0xFFFFFFFFU;
const ulong Var64 = a | b;

output[0] = Var64;

Currently it seems as if only 32 Bits of data are written into the output-buffer. On host application side the buffer is of type uint64 (numpy - Python).

Thanks,

Dia

Outcomes