ONE - On-device Neural Engine
|
Parent class of InputTensorContext and OutputTensorContext. More...
#include <TensorContext.h>
Public Member Functions | |
TensorContext (const ParsedTensors &tensors) | |
TensorContext (const TensorContext &)=delete | |
TensorContext (TensorContext &&)=delete | |
uint32_t | size (void) const override |
std::string | name (uint32_t n) const override |
nncc::core::ADT::tensor::Shape | shape (uint32_t n) const override |
bool | isFloatTensor (uint32_t n) const override |
virtual void | getMutableFloatTensor (uint32_t n, const nnkit::TensorContext::TypedAccessor< float > &f)=0 |
virtual void | getConstFloatTensor (uint32_t n, const nnkit::TensorContext::TypedReader< float > &f) const =0 |
Public Member Functions inherited from nnkit::TensorContext | |
virtual | ~TensorContext ()=default |
virtual bool | isS32Tensor (uint32_t n) const |
virtual void | getMutableS32Tensor (uint32_t n, const TypedAccessor< int32_t > &cb) |
virtual void | getConstS32Tensor (uint32_t n, const TypedReader< int32_t > &cb) const |
Additional Inherited Members | |
Public Types inherited from nnkit::TensorContext | |
template<typename T > | |
using | TypedReader = std::function< void(const TensorContext &, uint32_t n, const nncc::core::ADT::tensor::Reader< T > &)> |
template<typename T > | |
using | TypedAccessor = std::function< void(const TensorContext &, uint32_t n, nncc::core::ADT::tensor::Accessor< T > &)> |
Parent class of InputTensorContext and OutputTensorContext.
Definition at line 42 of file TensorContext.h.
|
inline |
Definition at line 45 of file TensorContext.h.
|
delete |
|
delete |
|
pure virtual |
Reimplemented from nnkit::TensorContext.
Implemented in nnkit::support::moco::tf::InputTensorContext, and nnkit::support::moco::tf::OutputTensorContext.
|
pure virtual |
Reimplemented from nnkit::TensorContext.
Implemented in nnkit::support::moco::tf::InputTensorContext, and nnkit::support::moco::tf::OutputTensorContext.
|
inlineoverridevirtual |
Reimplemented from nnkit::TensorContext.
Definition at line 70 of file TensorContext.h.
|
inlineoverridevirtual |
Implements nnkit::TensorContext.
Definition at line 57 of file TensorContext.h.
|
inlineoverridevirtual |
Implements nnkit::TensorContext.
Definition at line 63 of file TensorContext.h.
Referenced by RandomDataGenerator.RandomDataGenerator::_gen_float32(), RandomDataGenerator.RandomDataGenerator::_gen_int16(), RandomDataGenerator.RandomDataGenerator::_gen_uint8(), and nnkit::support::moco::tf::OutputTensorContext::getConstFloatTensor().
|
inlineoverridevirtual |
Implements nnkit::TensorContext.
Definition at line 54 of file TensorContext.h.