/usr/include/c++/4.1.3/cstdlib(178): internal error: can't generate code for non empty constructors or destructors on device
1 catastrophic error detected in the compilation of "/tmp/tmpxft_0000235b_00000000-4_sphuniformgrid.cpp1.ii".
Compilation aborted.
Aborted (core dumped)
Is there any particular reason I can’t do this even though particleMass and referenceDensity are also constant values (written before the smoothingLength constant).
Obviously this would work in regular C, so I wanna know if there’s a workaround. (Other than to not put it into constant memory :P)
I’ll check out the cudaMemCpyToSymbol, but really I was hoping the compiler would take care of somthing like this for me :) Especially for constant memory.
It sounds like the compiler ignored the construct and optimized it out. What about ‘constant const float smoothingLength’ or ‘volatile const float temp’?