【发布时间】:2014-04-26 18:00:32
【问题描述】:
我想在内核中执行此操作:
int count[8];
我几乎肯定你可以在 CUDA GPU 内核中声明固定大小的数组。那么在使用 Cudafy 时我该如何做呢?这不起作用:
[Cudafy]
public static void kernelFunction(int[] input, int[] output)
{
int count[8];
// ....other stuff
}
以上代码导致 C# 错误:“无法在变量声明中指定数组大小(尝试使用 'new' 表达式进行初始化)。”
【问题讨论】:
标签: c# c++ arrays cuda cudafy.net