Which header file is cudaHostAlloc() include in?

:wacko: i want use cudaHostAlloc() and cudaHostAllocWriteCombined, but the following error was shown: (I had included cuda.h and cuda_runtime.h or cuda_runtime_api.h)
nvcc -lcufft -lg2c -c rlft3_cuda.cu -o rlft3_cuda.o
rlft3_cuda.cu(155): error: identifier “cudaHostAllocWriteCombined” is undefined
rlft3_cuda.cu(155): error: identifier “cudaHostAlloc” is undefined

the cuda manual never shows any extra header files should be included.

thank you!

I have CUDA 2.2 and it’s in cuda_runtime_api.h:

extern __host__ cudaError_t CUDARTAPI cudaHostAlloc(void **pHost, size_t bytes, unsigned int flags);

I am usinig CUDA 2.1.

Maybe it is only include in 2.2.

Thank you.

cudaHostAlloc is new in 2.2.