Broadcast¶
-
event
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.
- Return
ccl::event an object to track the progress of the operation
- Parameters
buf
: [in,out] the buffer withcount
elements ofdtype
serves as send buffer for root and as receive buffer for other rankscount
: the number of elements of typedtype
inbuf
dtype
: the datatype of elements inbuf
root
: the rank that broadcastsbuf
comm
: the communicator for which the operation will be performedstream
: a stream associated with the operationattr
: optional attributes to customize operationdeps
: an optional vector of the events that the operation should depend on
-
event
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.
-
template<class
BufferType
, class = typename std::enable_if<is_native_type_supported<BufferType>(), event>::type>
eventbroadcast
(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.
-
template<class
BufferType
, class = typename std::enable_if<is_native_type_supported<BufferType>(), event>::type>
eventbroadcast
(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.
-
template<class
BufferObjectType
, class = typename std::enable_if<is_class_supported<BufferObjectType>(), event>::type>
eventbroadcast
(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.
-
template<class
BufferObjectType
, class = typename std::enable_if<is_class_supported<BufferObjectType>(), event>::type>
eventbroadcast
(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.