Fix cuda launch failures for zero-size AOS3D, SOA3D and Array.
In cuda11.6 with debug mode, zero-size allocations seem to leave the pointers in an undefined state. When those pointers are freed, the following kernel invocations fail with "Unspecified launch failure".
By not allocating zero-size memory requests and ensuring that internal pointers are consistently
set to nullptr
, the problems are fixed.
Furthermore:
- Small modernisation of initialisers and constructors for storage classes.
- Array::Allocate() now sets the fAllocated bit, instead of trusting that the caller did this.
Edited by Stephan Hageboeck