cudaHostRegister: Registers an existing host memory range for use by CUDA

Description Usage Arguments References See Also

Description

Page-locks the memory range specified by ptr and size and maps it for the device(s) as specified by flags. This memory range also is added to the same tracking mechanism as cudaHostAlloc() to automatically accelerate calls to functions such as cudaMemcpy(). Since the memory can be accessed directly by the device, it can be read or written with much higher bandwidth than pageable memory that has not been registered. Page-locking excessive amounts of memory may degrade system performance, since it reduces the amount of memory available to the system for paging. As a result, this function is best used sparingly to register staging areas for data exchange between host and device.

Usage

1
cudaHostRegister(ptr, size, flags)

Arguments

ptr

Host pointer to memory to pagelock

size

Size in bytes of the address range to pagelock in bytes

flags

Flags for allocation request

References

http://docs.nvidia.com/cuda/cuda-driver-api/index.html

See Also

cudaHostUnregister cudaHostGetFlags cudaHostGetDevicePointer


duncantl/RCUDA documentation built on May 15, 2019, 5:26 p.m.