TensorRearranger

#include <poplar/TensorRearranger.hpp>
namespace poplar

Poplar classes and functions.

class TensorRearranger
#include <TensorRearranger.hpp>

TensorRearranger can be used to re-order the view on a tensor and to undo that re-ordering.

Public Functions

TensorRearranger()
TensorRearranger(const TensorRearranger &other)
TensorRearranger(TensorRearranger &&other) noexcept
TensorRearranger &operator=(const TensorRearranger &other) &
TensorRearranger &operator=(TensorRearranger &&other) & noexcept
~TensorRearranger()
Tensor rearrange(const Tensor &t) const

Rearrange a tensor.

Tensor undoRearrangement(const Tensor &t) const

Undo the rearrangement done with the rearrange() method.

std::vector<Interval> rearrange(ArrayRef<Interval> is) const

Rearrange intervals.

Parameters

is – A list of intervals from the original tensor.

Returns

A list of equivalent intervals from the rearranged tensor.

std::vector<Interval> undoRearrangement(ArrayRef<Interval> is) const

Undo the rearrangement of intervals.

Parameters

is – A list of intervals from the rearranged tensor.

Returns

A list of equivalent intervals from the original tensor.

TensorRearranger(std::unique_ptr<core::TensorRearranger>)
inline core::TensorRearranger &getImpl() const
inline std::unique_ptr<core::TensorRearranger> *getPImpl()
inline bool valid() const

Private Members

std::unique_ptr<core::TensorRearranger> impl
namespace core