我想在内核中执行此操作:
int count[8];
我几乎肯定你可以在 CUDA GPU 内核中声明固定大小的数组。那么在使用 Cudafy 时我该如何做呢?这不起作用:
[Cudafy]
public static void kernelFunction(int[] input, int[] output)
{
int count[8];
// ....other stuff
}
上述代码导致 C# 错误:“无法在变量声明中指定数组大小(尝试使用‘new’表达式进行初始化)。”