How to initialize this type of array:
I don’t want to use Tuples because there are too many problems with math operations doing on them(they can’t for example increment and work with
I mean I can do something like
ArrayName=cu(fill((0.0f0,0.0f0),(20,20,5))); #in @cuda kernel @atomic ArrayName[Index]= ArrayName[Index].+SomeDataValues
, but I get undefined operation error, when I use it that way. So i would prefer using Arrays of Array:
ArrayName=cu(fill((0.0f0,0.0f0),(20,20,5))); @atomic ArrayName[Index]+=SomeDataValues
I know that the easiest way is to double Arrays(I mean to create two single Arrays instead of double one), but it would be slower and I would have to duplicate code.