![]() Integer ( kind = C_INT ), intent ( IN ) :: a, b Launch kernel with one thread for each element.įprintf(stderr, "addKernel launch failed: %s\n",įprintf(stderr, "cudaDeviceSynchronize returned error code %d\n", cudaStatus) ĬudaStatus = cudaMemcpy(c, dev_c, size * sizeof(int), cudaMemcpyDeviceToHost) Īnd the Fortran 90 code for the function “FOO( c, a, b)” is: SUBROUTINE FOO ( c, a, b ) BIND ( C ) Printf( "%d %d = %d\n", a, b, c ) ĬudaError_t addWithCuda(int *c, int *a, int *b, unsigned int size)įprintf(stderr, "cudaSetDevice failed!") ĬudaStatus = cudaMalloc((void**)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |