I have one shared array just like the programming guide says to do, but when I compile it barfs. Is there an option I’m missing or what? This seems to be something pretty big for it to be a compiler bug, so I have to be missing something
error: incomplete type is not allowed attribute((shared)) RayStruct shared;
I have an addendum to this problem. Now that I have everything else working, when I try to set a value in shared memory, the execution stops and I get a message “Aborted (core dumped)”. Anyone else get this problem?
Really shared[0].orig[0] = 0.f is enough to make it abort (orig is a float[3] in RayStruct).
Are you allocating your shared memory in the kernel call? I.e. in kernel<<<blocks, threads, shared>>>() is shared set to the correct number of bytes for the amount of shared memory you will use in each block?