Broadcast
event CCL_API broadcast (void *buf, size_t count, datatype dtype, int root, const communicator &comm, const stream &stream, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
Broadcast is a collective communication operation that broadcasts data from one rank of communicator (denoted as root) to all other ranks.
- Parameters
-
buf – [in/out] the buffer with count elements of dtype serves as send buffer for root and as the output buffer for all other ranks
count – the number of elements of type dtype in buf
dtype – the datatype of elements in buf
root – the rank that broadcasts buf
comm – the communicator for which the operation will be performed
stream – abstraction over a device queue constructed via ccl::create_stream
attr – optional attributes to customize operation
deps – an optional vector of the events that the operation should depend on
- Returns
-
ccl::event an object to track the progress of the operation
event CCL_API broadcast (void *buf, size_t count, datatype dtype, int root, const communicator &comm, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Type-safe version.
template<class BufferType, class = typename std::enable_if<is_native_type_supported<BufferType>(), event>::type> event CCL_API broadcast (BufferType *buf, size_t count, int root, const communicator &comm, const stream &stream, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Type-safe version.
template<class BufferType, class = typename std::enable_if<is_native_type_supported<BufferType>(), event>::type> event CCL_API broadcast (BufferType *buf, size_t count, int root, const communicator &comm, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Type-safe version.
template<class BufferObjectType, class = typename std::enable_if<is_class_supported<BufferObjectType>(), event>::type> event CCL_API broadcast (BufferObjectType &buf, size_t count, int root, const communicator &comm, const stream &stream, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Type-safe version.
template<class BufferObjectType, class = typename std::enable_if<is_class_supported<BufferObjectType>(), event>::type> event CCL_API broadcast (BufferObjectType &buf, size_t count, int root, const communicator &comm, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Type-safe version.
event CCL_API broadcast (void *send_buf, void *recv_buf, size_t count, datatype dtype, int root, const communicator &comm, const stream &stream, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
Broadcast is a collective communication operation that broadcasts data from one rank of communicator (denoted as root) to all other ranks.
- Parameters
-
send_buf – [in] the buffer with count elements of dtype serves as send buffer for root. The send_buf is only used by the root rank (and ignored by all the other ranks).
recv_buf – [out] the buffer with count elements of dtype serves as receive buffer for all ranks, including the root.
count – the number of elements of type dtype in send_buf
dtype – the datatype of elements in send_buf
root – the rank that broadcasts send_buf
comm – the communicator for which the operation will be performed
stream – abstraction over a device queue constructed via ccl::create_stream
attr – optional attributes to customize operation
deps – an optional vector of the events that the operation should depend on
- Returns
-
ccl::event an object to track the progress of the operation
event CCL_API broadcast (void *send_buf, void *recv_buf, size_t count, datatype dtype, int root, const communicator &comm, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Type-safe version.
template<class BufferType, class = typename std::enable_if<is_native_type_supported<BufferType>(), event>::type> event CCL_API broadcast (BufferType *send_buf, BufferType *recv_buf, size_t count, int root, const communicator &comm, const stream &stream, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Type-safe version.
template<class BufferType, class = typename std::enable_if<is_native_type_supported<BufferType>(), event>::type> event CCL_API broadcast (BufferType *send_buf, BufferType *recv_buf, size_t count, int root, const communicator &comm, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Type-safe version.
template<class BufferObjectType, class = typename std::enable_if<is_class_supported<BufferObjectType>(), event>::type> event CCL_API broadcast (BufferObjectType &send_buf, BufferObjectType &recv_buf, size_t count, int root, const communicator &comm, const stream &stream, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Type-safe version.
template<class BufferObjectType, class = typename std::enable_if<is_class_supported<BufferObjectType>(), event>::type> event CCL_API broadcast (BufferObjectType &send_buf, BufferObjectType &recv_buf, size_t count, int root, const communicator &comm, const broadcast_attr &attr=default_broadcast_attr, const vector_class< event > &deps={})
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Type-safe version.