thirdparty/cuda/api/memory.hpp
inline void register_(void *ptr, size_t size, unsigned flags)
{
	auto result = cudaHostRegister(ptr, size, flags);
	cuda::throw_if_error(result,
		"Could not register a region of page-locked host memory");
}
/**
 * @brief Makes a preallocated memory region behave as though it were allocated with @ref host::allocate.
 *
 * 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().
 *
 * @param ptr A pre-allocated stretch of host memory
 * @param size the size in bytes the memory region to register/pin
 * @param flags
 */
@brief Makes a preallocated memory region behave as though it were allocated with @ref host::allocate.
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().

@param ptr A pre-allocated stretch of host memory
@param size the size in bytes the memory region to register/pin
@param flags
@brief Makes a preallocated memory region behave as though it were allocated with @ref host :: allocate . 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 () . @param ptr A pre - allocated stretch of host memory @param size the size in bytes the memory region to register / pin @param flags
inline void register_(void *ptr, size_t size, unsigned flags)
{
	auto result = cudaHostRegister(ptr, size, flags);
	cuda::throw_if_error(result,
		"Could not register a region of page-locked host memory");
}
inline void register_ ( void * ptr , size_t size , unsigned flags ) { auto result = cudaHostRegister ( ptr , size , flags ) ; cuda :: throw_if_error ( result , " " ) ; }
@brief Makes a preallocated memory region behave as though it were allocated with @ref host::allocate.
@brief Makes a preallocated memory region behave as though it were allocated with @ref host :: allocate .