cudaError_t cudaPointerGetAttributes ( struct cudaPointerAttributes attributes,
void *  ptr 
)

Returns in *attributes the attributes of the pointer ptr.

The cudaPointerAttributes structure is defined as:

In this structure, the individual fields mean

  • device is the device against which ptr was allocated. If ptr has memory type cudaMemoryTypeDevice then this identifies the device on which the memory referred to by ptr physically resides. If ptr has memory type cudaMemoryTypeHost then this identifies the device which was current when the allocation was made (and if that device is deinitialized then this allocation will vanish with that device's state).

  • devicePointer is the device pointer alias through which the memory referred to by ptr may be accessed on the current device. If the memory referred to by ptr cannot be accessed directly by the current device then this is NULL.

  • hostPointer is the host pointer alias through which the memory referred to by ptr may be accessed on the host. If the memory referred to by ptr cannot be accessed directly by the host then this is NULL.

Parameters:
attributes - Attributes for the specified pointer
ptr - Pointer to get attributes for
Returns:
cudaSuccess, cudaErrorInvalidDevice
See also:
cudaGetDeviceCount, cudaGetDevice, cudaSetDevice, cudaChooseDevice


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA