SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
Public Member Functions | Protected Attributes | List of all members
smaug::ReshapeOp< Backend > Class Template Reference

Changes the Tensor's shape while retaining the number of elements. More...

#include <reshape_op.h>

Detailed Description

template<typename Backend>
class smaug::ReshapeOp< Backend >

Changes the Tensor's shape while retaining the number of elements.

Implements the reshape operator, which changes the dimensionality of a Tensor while retaining the same number of elements. The output need not be of the same DataLayout.

Template Parameters
BackendThe Backend specialization of this Operator.

Definition at line 43 of file backend.h.

Public Member Functions

 ReshapeOp (const std::string &name, Workspace *workspace)
 
 ReshapeOp (const std::string &name, Workspace *workspace, const std::vector< int > &_shape, DataLayout _layout)
 
void setShape (const std::vector< int > &_shape, DataLayout _layout)
 Set the desired shape of the output.
 
void setShape (const std::initializer_list< int > &_shape, DataLayout _layout)
 Set the desired shape of the output.
 
void createAllTensors () override
 
void run () override
 

Protected Attributes

std::vector< int > shape
 
DataLayout layout
 

The documentation for this class was generated from the following files: