cuPointerGetAttribute: Returns information about a pointer

Description Usage Arguments References See Also

Description

If the current CUcontext does not support unified virtual addressing then CUDA_ERROR_INVALID_CONTEXT is returned.

- CU_POINTER_ATTRIBUTE_DEVICE_POINTER:

Returns the device pointer value through which ptr may be accessed by kernels running in the current CUcontext. The type of data must be CUdeviceptr *.

If there exists no device pointer value through which kernels running in the current CUcontext may access ptr then CUDA_ERROR_INVALID_VALUE is returned.

If there is no current CUcontext then CUDA_ERROR_INVALID_CONTEXT is returned.

Except in the exceptional disjoint addressing cases discussed below, the value returned will equal the input value ptr.

- CU_POINTER_ATTRIBUTE_HOST_POINTER:

Returns the host pointer value through which ptr may be accessed by by the host program. The type of data must be void **. If there exists no host pointer value through which the host program may directly access ptr then CUDA_ERROR_INVALID_VALUE is returned.

Except in the exceptional disjoint addressing cases discussed below, the value returned will equal the input value ptr.

Usage

1
cuPointerGetAttribute(data, attribute, ptr)

Arguments

data

Returned pointer attribute value

attribute

Pointer attribute to query

ptr

Pointer

References

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

See Also

cuMemAlloc cuMemFree cuMemAllocHost cuMemFreeHost cuMemHostAlloc cuMemHostRegister cuMemHostUnregister


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