I am using CUDAfy .NET and want to pass a struct array within a struct to the device.
I have declared them in c# as shown below:
public struct A
[MarshalAs(UnmanagedType.ByValArray, ArraySubType= UnmanagedType.Struct, SizeConst = 3)]
public B ba;
public struct B
public byte id;
This results in the following source code for the GPU:
unsigned char id;
B ba ;
And I get this compilation error from an attempt to convert it to OpenCL code:
Compilation error: <kernel>:20:2: error: must use 'struct' tag to refer to type 'B'
B ba ; int baLen0;
I realize this could be an issue between the marshalling and how CUDAfy .NET handles structures, but is there any way I could possibly change this to work, or can CUDAfy .NET be changed include the struct keyword in the other structure?
Thanks in advance