Skip to main content

cuMulticastCreate

Function cuMulticastCreate 

Source
pub unsafe extern "C" fn cuMulticastCreate(
    mcHandle: *mut CUmemGenericAllocationHandle,
    prop: *const CUmulticastObjectProp,
) -> CUresult
Expand description

Create a generic allocation handle representing a multicast object described by the given properties.

This creates a multicast object as described by prop. The number of participating devices is specified by CUmulticastObjectProp::numDevices. Devices can be added to the multicast object via cuMulticastAddDevice. All participating devices must be added to the multicast object before memory can be bound to it. Memory is bound to the multicast object via cuMulticastBindMem, cuMulticastBindMem_v2, cuMulticastBindAddr, or cuMulticastBindAddr_v2. and can be unbound via cuMulticastUnbind. The total amount of memory that can be bound per device is specified by :CUmulticastObjectProp::size. This size must be a multiple of the value returned by cuMulticastGetGranularity with the flag CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM. For best performance however, the size should be aligned to the value returned by cuMulticastGetGranularity with the flag CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED.

After all participating devices have been added, multicast objects can also be mapped to a device’s virtual address space using the virtual memory management APIs (see cuMemMap and cuMemSetAccess). Multicast objects can also be shared with other processes by requesting a shareable handle via cuMemExportToShareableHandle. Note that the desired types of shareable handles must be specified in the bitmask CUmulticastObjectProp::handleTypes. Multicast objects can be released using the virtual memory management API cuMemRelease.

§Parameters

  • mcHandle: Value of handle returned.
  • prop: Properties of the multicast object to create.

§Return value

See also: cuMulticastAddDevice, cuMulticastBindMem, cuMulticastBindAddr, cuMulticastUnbind, cuMemCreate, cuMemRelease, cuMemExportToShareableHandle, cuMemImportFromShareableHandle, cuMulticastBindAddr_v2, cuMulticastBindMem_v2.