FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kBool kCudaUtils_IsArrayDeviceAccessible ( kArrayProvider  array,
kBool  isExclusive = kTRUE 
)

Reports whether an array's buffer can potentially be accessed by a Cuda device.

For serial managed memory, exclusive ownership can optionally be taken into account (i.e., if ownership is not exclusive, implying that the memory might be in use by other threads, then the memory cannot be safely attached to a stream for device use). If this method indicates that a serial managed memory buffer can potentially be used by a device, remember to attach the buffer to a stream before attempting to access the buffer from a device.

Parameters
arrayArray to be checked.
isExclusiveStipulates whether the array is owned exclusively (i.e., not simultaneously in use elsewhere).
Returns
kTRUE if memory is potentially device-accessible.