Alltoall

event alltoall(const void *send_buf, void *recv_buf, size_t count, datatype dtype, const communicator &comm, const stream &stream, const alltoall_attr &attr = default_alltoall_attr, const vector_class<event> &deps = {})

Alltoall is a collective communication operation in which each rank sends distinct equal-sized blocks of data to each rank. The j-th block of send_buf sent from the i-th rank is received by the j-th rank and is placed in the i-th block of recvbuf.

Return

ccl::event an object to track the progress of the operation

Parameters
  • send_buf: the buffer with count elements of dtype that stores local data to be sent

  • recv_buf: [out] the buffer to store received result, should be large enough to hold values from all ranks, i.e. at least comm_size * count

  • send_bufs: array of buffers with local data to be sent, one buffer per each rank

  • recv_bufs: [out] array of buffers to store received result, one buffer per each rank

  • count: the number of elements of type dtype to be send to or to received from each rank

  • dtype: the datatype of elements in send_buf and recv_buf

  • comm: the communicator for which the operation will be performed

  • stream: a stream associated with the operation

  • attr: optional attributes to customize operation

  • deps: an optional vector of the events that the operation should depend on

event alltoall(const void *send_buf, void *recv_buf, size_t count, datatype dtype, const communicator &comm, const alltoall_attr &attr = default_alltoall_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.

event alltoall(const vector_class<void*> &send_buf, const vector_class<void*> &recv_buf, size_t count, datatype dtype, const communicator &comm, const stream &stream, const alltoall_attr &attr = default_alltoall_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.

event alltoall(const vector_class<void*> &send_buf, const vector_class<void*> &recv_buf, size_t count, datatype dtype, const communicator &comm, const alltoall_attr &attr = default_alltoall_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>
event alltoall(const BufferType *send_buf, BufferType *recv_buf, size_t count, const communicator &comm, const stream &stream, const alltoall_attr &attr = default_alltoall_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>
event alltoall(const BufferType *send_buf, BufferType *recv_buf, size_t count, const communicator &comm, const alltoall_attr &attr = default_alltoall_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>
event alltoall(const vector_class<BufferType*> &send_buf, const vector_class<BufferType*> &recv_buf, size_t count, const communicator &comm, const stream &stream, const alltoall_attr &attr = default_alltoall_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>
event alltoall(const vector_class<BufferType*> &send_buf, const vector_class<BufferType*> &recv_buf, size_t count, const communicator &comm, const alltoall_attr &attr = default_alltoall_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>
event alltoall(const BufferObjectType &send_buf, BufferObjectType &recv_buf, size_t count, const communicator &comm, const stream &stream, const alltoall_attr &attr = default_alltoall_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>
event alltoall(const BufferObjectType &send_buf, BufferObjectType &recv_buf, size_t count, const communicator &comm, const alltoall_attr &attr = default_alltoall_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>
event alltoall(const vector_class<reference_wrapper_class<BufferObjectType>> &send_buf, const vector_class<reference_wrapper_class<BufferObjectType>> &recv_buf, size_t count, const communicator &comm, const stream &stream, const alltoall_attr &attr = default_alltoall_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>
event alltoall(const vector_class<reference_wrapper_class<BufferObjectType>> &send_buf, const vector_class<reference_wrapper_class<BufferObjectType>> &recv_buf, size_t count, const communicator &comm, const alltoall_attr &attr = default_alltoall_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.