【发布时间】:2011-10-26 21:15:35
【问题描述】:
如何在 cuda 的每个实例中将参数向量视为局部变量?
__global__ void kern(char *text, int N){
//if i change text[0]='0'; the change only affects the current instance of the kernel and not the other threads
}
谢谢!
【问题讨论】:
-
N表示什么?每个数组的长度? -
您是否访问每个块的所有文本元素?你的内核配置如何?