norop

Byte addressable storing bug???

Discussion created by norop on Jun 3, 2010
Latest reply on Jun 8, 2010 by MicahVillmow

Hello,

I want use byte addressable storing. But not working correctly.

I think it's a bug. Is there a plan to fix?

The attached code is to clear the array contents, but not initialized.

If ARRAYSIZE is 1, it works fine.

Using char4 instead of 'char[4]' works fine, but I want to use more complex structure.

 

#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable #define ARRAYSIZE 2 ... struct { char element[4]; } ch4[ARRAYSIZE]; for(int i = 0; i < 2; i++) { ch4[i].element[0] = 0; ch4[i].element[1] = 0; ch4[i].element[2] = 0; ch4[i].element[3] = 0; }

Outcomes