ONE - On-device Neural Engine
|
#include <TensorContext.h>
Public Member Functions | |
TensorContext (const std::vector< std::unique_ptr< ParsedTensor > > &tensors, TensorDataMap &data_map) | |
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 |
void | getMutableFloatTensor (uint32_t n, const nnkit::TensorContext::TypedAccessor< float > &f) override |
void | getConstFloatTensor (uint32_t n, const nnkit::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 35 of file TensorContext.h.
|
inline |
Definition at line 38 of file TensorContext.h.
|
delete |
|
delete |
|
overridevirtual |
Reimplemented from nnkit::TensorContext.
Definition at line 45 of file TensorContext.cpp.
References nnkit::support::tf::TensorDataMap::data(), nncc::core::ADT::tensor::make_overlay(), and shape().
|
overridevirtual |
Reimplemented from nnkit::TensorContext.
Definition at line 32 of file TensorContext.cpp.
References nnkit::support::tf::TensorDataMap::data(), nncc::core::ADT::tensor::make_overlay(), and shape().
|
inlineoverridevirtual |
Reimplemented from nnkit::TensorContext.
Definition at line 64 of file TensorContext.h.
|
inlineoverridevirtual |
Implements nnkit::TensorContext.
Definition at line 51 of file TensorContext.h.
|
inlineoverridevirtual |
Implements nnkit::TensorContext.
Definition at line 57 of file TensorContext.h.
Referenced by RandomDataGenerator.RandomDataGenerator::_gen_float32(), RandomDataGenerator.RandomDataGenerator::_gen_int16(), RandomDataGenerator.RandomDataGenerator::_gen_uint8(), getConstFloatTensor(), and getMutableFloatTensor().
|
inlineoverridevirtual |
Implements nnkit::TensorContext.
Definition at line 48 of file TensorContext.h.