小编use*_*397的帖子

CUDA同步内核

嗨我对CUDA中的编程有疑问.我有以下代码:

int main () {

    for (;;) {
        kernel_1 (x1, x2, ....);
        kernel_2 (x1, x2 ...);
        kernel_3_Reduction (x1);

    // code manipulation host_x1
    // Copy the pointer device to host
        cpy (host_x1, x1, DeviceToHost)
        cpu_code_x1_manipulation;
        kernel_ (x1, x2, ....);
    }

}
Run Code Online (Sandbox Code Playgroud)

所以当副本发出时,我如何确保kernel_1,kernel_2 kernel_3并完成了他们的任务?

cuda

5
推荐指数
2
解决办法
6342
查看次数

标签 统计

cuda ×1