|
ONE - On-device Neural Engine
|
#include <Operand.h>
Public Member Functions | |
| Operand (const Shape &shape, const TypeInfo &type) | |
| Operand (const Operand &)=default | |
| const Shape & | shape (void) const |
| const TypeInfo & | typeInfo (void) const |
| const OperandInfo & | info (void) const |
| OperandInfo & | info (void) |
| size_t | operandSize (void) const |
| const OperationIndexSet & | getUses () const |
| OperationIndex | getDef () const |
| void | insertUse (const OperationIndex &idx) |
| void | removeUse (const OperationIndex &idx) |
| void | setDef (const OperationIndex &idx) |
| void | unsetDef () |
| void | clearDefUse () |
| void | type (const DataType type) |
| void | data (std::shared_ptr< Data > &&data) |
| const Data * | data (void) const |
| void | releaseData (void) |
| std::shared_ptr< Data > | shareData (void) const |
| bool | isConstant (void) const |
Get true if Operand is const, otherwise false a. | |
| template<typename T , typename... Args> | |
| void | data (Args &&...args) |
| template<typename T > | |
| T | asScalar (void) const |
| template<typename T > | |
| std::vector< T > | asVector () const |
| void | setOriginIndex (OriginIndex origin) |
| OriginIndex | originIndex () const |
|
explicitdefault |
|
inline |
Definition at line 86 of file Operand.h.
References shape().
Referenced by onert::backend::acl_common::asPixelValue().
|
inline |
| void Operand::clearDefUse | ( | ) |
Definition at line 47 of file Operand.cc.
References onert::ir::OperationIndexSet::clear(), and unsetDef().
Referenced by onert::compiler::pass::ConstantInsertionPass::callback().
|
inline |
|
inline |
Definition at line 62 of file Operand.h.
References data(), and onert::ir::OperandInfo::setAsConstant().
Referenced by onert::backend::acl_common::asSet(), onert::backend::acl_common::initReverseOrder(), onert::backend::acl_common::AclConstantInitializer::visit(), onert::backend::acl_cl::ConstantInitializer::visit(), onert::backend::acl_cl::ConstantInitializer::visit(), and onert::backend::acl_neon::ConstantInitializer::visit().
|
inline |
|
inline |
Definition at line 51 of file Operand.h.
Referenced by onert::ir::train::TrainableGraph::btopolSortOperations().
|
inline |
|
inline |
|
inline |
Definition at line 46 of file Operand.h.
Referenced by onert::ir::train::TrainableGraph::changeBackwardShape(), and onert::compiler::StaticShapeInferer::dump().
| void Operand::insertUse | ( | const OperationIndex & | idx | ) |
Definition at line 39 of file Operand.cc.
References onert::ir::OperationIndexSet::insert().
|
inline |
Get true if Operand is const, otherwise false a.
true if Operand is const, otherwise false Definition at line 77 of file Operand.h.
References onert::ir::OperandInfo::isConstant().
Referenced by onert::backend::acl_common::asPixelValue(), onert::backend::train::BackendContext::gen(), onert::backend::builtin::train::BackendContext::gen(), onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::initConsts(), and onert::backend::basic::initConsts().
| size_t Operand::operandSize | ( | void | ) | const |
Definition at line 22 of file Operand.cc.
References shape(), onert::ir::sizeOfDataType(), type, onert::ir::TypeInfo::type(), and typeInfo().
|
inline |
Definition at line 106 of file Operand.h.
References onert::ir::OperandInfo::originIndex().
Referenced by onert::dumper::text::dumpGraph().
|
inline |
| void Operand::removeUse | ( | const OperationIndex & | idx | ) |
Definition at line 41 of file Operand.cc.
References onert::ir::OperationIndexSet::remove().
| void Operand::setDef | ( | const OperationIndex & | idx | ) |
Definition at line 43 of file Operand.cc.
|
inline |
Definition at line 105 of file Operand.h.
References onert::ir::OperandInfo::setOriginIndex().
|
inline |
Definition at line 44 of file Operand.h.
References onert::ir::OperandInfo::shape().
Referenced by RandomDataGenerator.RandomDataGenerator::_gen_float32(), RandomDataGenerator.RandomDataGenerator::_gen_int16(), RandomDataGenerator.RandomDataGenerator::_gen_uint8(), onert::backend::acl_common::asPixelValue(), asScalar(), onert::backend::acl_common::asSet(), onert::backend::acl_common::initReverseOrder(), operandSize(), onert::backend::acl_common::AclConstantInitializer::visit(), onert::backend::acl_cl::ConstantInitializer::visit(), and onert::backend::acl_neon::ConstantInitializer::visit().
|
inline |
Definition at line 71 of file Operand.h.
Referenced by onert::backend::train::BackendContext::gen(), and onert::backend::basic::initConsts().
|
inline |
Definition at line 59 of file Operand.h.
References type, and onert::ir::OperandInfo::type().
|
inline |
Definition at line 45 of file Operand.h.
References onert::ir::OperandInfo::typeInfo().
Referenced by onert::backend::acl_common::asPixelValue(), onert::backend::acl_common::asSet(), and operandSize().
| void Operand::unsetDef | ( | ) |
Definition at line 45 of file Operand.cc.
Referenced by clearDefUse().