【发布时间】:2014-02-24 13:05:04
【问题描述】:
我试图在循环中编写我的内核。 每次我想改变我的网格大小和块大小.. 我写过这样的东西..
dim3 grid(1,1);
dim3 block(N,N);
kernel<<<grid, block>>>();
while(condition)
{
//Here I want to change my grid and block size
kernel<<<grid,block>>>();
}
我不能再次使用网格和块来初始化不同的 N 值。 它显示错误:
error: "grid" has already been declared in the current scope
error: "block" has already been declared in the current scope
所以...谁能帮帮我...??
【问题讨论】:
标签: cuda