ONE - On-device Neural Engine
|
#include <TensorContext.h>
Public Member Functions | |
TensorContext (TensorSet &tensors) | |
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 |
void | getMutableFloatTensor (uint32_t n, const TensorContext::TypedAccessor< float > &f) override |
void | getConstFloatTensor (uint32_t n, const TensorContext::TypedReader< float > &f) const override |
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 > &)> |
Definition at line 31 of file TensorContext.h.
|
inline |
Definition at line 34 of file TensorContext.h.
|
overridevirtual |
Reimplemented from nnkit::TensorContext.
Definition at line 49 of file TensorContext.cpp.
References nnkit::support::tflite::TensorSet::at(), nncc::core::ADT::tensor::make_overlay(), and shape().
|
overridevirtual |
Reimplemented from nnkit::TensorContext.
Definition at line 35 of file TensorContext.cpp.
References nnkit::support::tflite::TensorSet::at(), nncc::core::ADT::tensor::make_overlay(), and shape().
|
inlineoverridevirtual |
Reimplemented from nnkit::TensorContext.
Definition at line 50 of file TensorContext.h.
References nnkit::support::tflite::TensorSet::at().
|
inlineoverridevirtual |
Implements nnkit::TensorContext.
Definition at line 43 of file TensorContext.h.
References nnkit::support::tflite::TensorSet::at().
|
overridevirtual |
Implements nnkit::TensorContext.
Definition at line 30 of file TensorContext.cpp.
References nnkit::support::tflite::TensorSet::at(), and nnkit::support::tflite::tensor_shape().
Referenced by RandomDataGenerator.RandomDataGenerator::_gen_float32(), RandomDataGenerator.RandomDataGenerator::_gen_int16(), RandomDataGenerator.RandomDataGenerator::_gen_uint8(), getConstFloatTensor(), and getMutableFloatTensor().
|
inlineoverridevirtual |
Implements nnkit::TensorContext.
Definition at line 40 of file TensorContext.h.
References nnkit::support::tflite::TensorSet::size().