cuda上使用printf函数

code:code #include <stdio.h> __global__ void helloCUDA(float f) { printf("Hello thread %d, f=%f\n", threadIdx.x, f); } int main() { helloCUDA<<<1, 5>>>(1.2345f); cudaDeviceReset(); return 0;
相关文章
相关标签/搜索