pub unsafe extern "C" fn cuMulticastBindMem(
mcHandle: CUmemGenericAllocationHandle,
mcOffset: usize,
memHandle: CUmemGenericAllocationHandle,
memOffset: usize,
size: usize,
flags: c_ulonglong,
) -> CUresult
Expand description
\brief Bind a memory allocation represented by a handle to a multicast object.
Binds a memory allocation specified by \p memHandle and created via ::cuMemCreate to a multicast object represented by \p mcHandle and created via ::cuMulticastCreate. The intended \p size of the bind, the offset in the multicast range \p mcOffset as well as the offset in the memory \p memOffset must be a multiple of the value returned by ::cuMulticastGetGranularity with the flag ::CU_MULTICAST_GRANULARITY_MINIMUM. For best performance however, \p size, \p mcOffset and \p memOffset should be aligned to the granularity of the memory allocation(see ::cuMemGetAllocationGranularity) or to the value returned by ::cuMulticastGetGranularity with the flag ::CU_MULTICAST_GRANULARITY_RECOMMENDED.
The \p size + \p memOffset cannot be larger than the size of the allocated memory. Similarly the \p size + \p mcOffset cannot be larger than the size of the multicast object. The memory allocation must have beeen created on one of the devices that was added to the multicast team via ::cuMulticastAddDevice. Externally shareable as well as imported multicast objects can be bound only to externally shareable memory. Note that this call will return CUDA_ERROR_OUT_OF_MEMORY if there are insufficient resources required to perform the bind. This call may also return CUDA_ERROR_SYSTEM_NOT_READY if the necessary system software is not initialized or running.
\param[in] mcHandle Handle representing a multicast object. \param[in] mcOffset Offset into the multicast object for attachment. \param[in] memHandle Handle representing a memory allocation. \param[in] memOffset Offset into the memory for attachment. \param[in] size Size of the memory that will be bound to the multicast object. \param[in] flags Flags for future use, must be zero for now.
\return ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_DEVICE, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_PERMITTED, ::CUDA_ERROR_NOT_SUPPORTED, ::CUDA_ERROR_OUT_OF_MEMORY, ::CUDA_ERROR_SYSTEM_NOT_READY
\sa ::cuMulticastCreate, ::cuMulticastAddDevice, ::cuMemCreate