Poplar and PopLibs
gcl::Chunks Struct Reference

A vector of Chunk data. More...

#include <Collectives.hpp>

Public Member Functions

 Chunks (const Chunks &)=default
 Defaulted to avoid warnings in deprecation period.
 
 Chunks (Chunks &&) noexcept=default
 Defaulted to avoid warnings in deprecation period.
 
Chunksoperator= (const Chunks &)=default
 Defaulted to avoid warnings in deprecation period. More...
 
Chunksoperator= (Chunks &&) noexcept=default
 Defaulted to avoid warnings in deprecation period. More...
 
 Chunks (unsigned size)
 A vector of Chunk data. More...
 
poplar::Tensor getOriginalInput () const
 Used to undo shuffles introduced by scatter. More...
 
const std::vector< Chunk > & getChunks () const
 Chunks produced by the scatter step. More...
 
void setOriginalInput (poplar::Tensor input)
 Set original input. More...
 
void setChunk (std::vector< Chunk >::size_type i, Chunk chunk)
 Set chunk. More...
 
void setChunks (std::vector< Chunk > chunks)
 Set chunks produced by scatter step. More...
 
poplar::Tensor concat () const
 Concatenates chunks. More...
 

Public Attributes

poplar::Tensor originalInput
 Used to undo shuffles introduced by scatter.
 
std::vector< Chunkchunks
 Chunks produced by the scatter step.
 

Detailed Description

A vector of Chunk data.

Constructor & Destructor Documentation

◆ Chunks()

gcl::Chunks::Chunks ( unsigned  size)
inlineexplicit

A vector of Chunk data.

Parameters
sizeLength of chunk vector

Member Function Documentation

◆ concat()

poplar::Tensor gcl::Chunks::concat ( ) const

Concatenates chunks.

Given the vector of Chunk data, its elements are sorted according to the offset or index and a tensor is returned that consists of sorted concatenated Chunk elements. This operation is performed on the output of the reduceScatterWithinReplica and on the input of the allGatherWithinReplica operations.

Returns
A concatenated vector consisting of sorted Chunk elements.

◆ getChunks()

const std::vector< Chunk > & gcl::Chunks::getChunks ( ) const

Chunks produced by the scatter step.

Returns
chunks

◆ getOriginalInput()

poplar::Tensor gcl::Chunks::getOriginalInput ( ) const

Used to undo shuffles introduced by scatter.

Returns
original input

◆ operator=() [1/2]

Chunks & gcl::Chunks::operator= ( Chunks &&  )
defaultnoexcept

Defaulted to avoid warnings in deprecation period.

Returns
The Chunks being assigned to

◆ operator=() [2/2]

Chunks & gcl::Chunks::operator= ( const Chunks )
default

Defaulted to avoid warnings in deprecation period.

Returns
The Chunks being assigned to

◆ setChunk()

void gcl::Chunks::setChunk ( std::vector< Chunk >::size_type  i,
Chunk  chunk 
)

Set chunk.

Parameters
ichunk index
chunkthe new chunk

◆ setChunks()

void gcl::Chunks::setChunks ( std::vector< Chunk chunks)

Set chunks produced by scatter step.

Parameters
chunksproduced chunks

◆ setOriginalInput()

void gcl::Chunks::setOriginalInput ( poplar::Tensor  input)

Set original input.

Parameters
inputoriginal input

The documentation for this struct was generated from the following file: