I need to declare an array passed to a function as volatile, does Cudafy.NET support this?
For example (in C#):
[Cudafy]
private static void doStuffOnGPU(GThread thread, volatile int[] output)
{
//do a whole bunch of stuff
}
I need to declare an array passed to a function as volatile, does Cudafy.NET support this?
For example (in C#):
[Cudafy]
private static void doStuffOnGPU(GThread thread, volatile int[] output)
{
//do a whole bunch of stuff
}
The answer is no, as of November 26, 2016, Cudafy.NET does not support the volatile keyword. However, you can tricksify Cudafy.NET into allowing it in certain circumstances.
Ex:
This code will use the global declaration when run serially for testing and will use the volatile declaration on the GPU.