pub unsafe extern "C" fn cuMulticastBindAddr(
mcHandle: CUmemGenericAllocationHandle,
mcOffset: usize,
memptr: CUdeviceptr,
size: usize,
flags: c_ulonglong,
) -> CUresult
Expand description
\brief Bind a memory allocation represented by a virtual address to a multicast object.
Binds a memory allocation specified by its mapped address \p memptr to a multicast object represented by \p mcHandle. The memory must have been allocated via ::cuMemCreate or ::cudaMallocAsync. The intended \p size of the bind, the offset in the multicast range \p mcOffset and \p memptr 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 memptr should be aligned to the value returned by ::cuMulticastGetGranularity with the flag ::CU_MULTICAST_GRANULARITY_RECOMMENDED.
The \p size cannot be larger than the size of the allocated memory. Similarly the \p size + \p mcOffset cannot be larger than the total 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 multicast va range for attachment. \param[in] memptr Virtual address of the memory allocation. \param[in] size Size of memory that will be bound to the multicast object. \param[in] flags Flags for future use, must be zero 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