When compiling, I get the following error: Error: Unaligned memory accesses not supported
__device__ void function()
{
uint8_t ib[8], block[8];
extern __shared__ uint8_t pkt[];
.... init ...
for( i = 1; i < n + 1; i++ )
{
... does stuff here...
for( j = 0; j < 8; j++ )
{
pkt[iHeader+8*(i-1)+j] = ib[j] ^ block[j]; //unalignment
}
}
}
the strange thing is that the following replaced in the code compiles fine:
uint8_t temp = ib[j] ^ block[j];
pkt[iHeader+8*(i-1)+j] = 0; //this is not the same ofcourse
but
uint8_t temp = ib[j] ^ block[j];
pkt[iHeader+8*(i-1)+j] = temp
doesnt work.
Can someone point me toward the sollution or origin of this problem? I have left out alot of code for clearity. Please ask if you need to see more code.
Thanks in advance!