I was using CUDA C for evaluation and now started using cudafy .net.
Lets assume that I have the following enum
[Cudafy]
public enum MyEnum
{
mon = 0,tue=1,wed=2,thu=3,fri=4,sat=5
}
I want to pass it to a Kernel
[Cudafy]
public static void Enum_Kernel(GThread thread, MyEnum[] en)
{
MyEnum day = en[thread.threadIdx.x];
}
I am allocating memory
MyEnum [] enum1 = new MyEnum[10];
for (int i = 0; i < 10; i++)
{
enum1[i] = MyEnum.mon;
}
MyEnum [] d_enum1 = gpu.CopyToDevice<MyEnum>(enum1);
During runtime, the program crashes at the aboce line with the message
Whats the issue i need to address ?