2013年9月12日 星期四

cuda.h cuda_runtime_api.h cuda_runtime.h 差異

cuda.h: defines the public host functions and types for the CUDA driver API.
cuda_runtime_api.h: defines the public host functions and types for the CUDA runtime API.
cuda_runtime.h: defines everything cuda_runtime_api.h does, as well as built-in type definitions and function overlays for the CUDA language extensions and device intrinsic functions.

If you were writing host code to be compiled with the host compiler which includes API calls, you would include either cuda.h or cuda_runtime_api.h.
If you needed other CUDA language built-ins, like types, and were using the runtime API and compiling with the host compiler, you would include cuda_runtime.h.
If you are writing code which will be compiled using nvcc, it is all irrelevant, because nvcc takes care of inclusion of all the required headers automatically without programmer intervention.

出處:
http://stackoverflow.com/questions/6302695/difference-between-cuda-h-cuda-runtime-h-cuda-runtime-api-h

沒有留言:

張貼留言