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 34 of file TensorContext.h.
|
inline |
Definition at line 37 of file TensorContext.h.
|
inlineoverridevirtual |
Reimplemented from nnkit::TensorContext.
Definition at line 87 of file TensorContext.h.
References nncc::core::ADT::tensor::make_overlay(), nnkit::support::onnx::TensorSet::mutable_tensor(), shape(), nnkit::support::onnx::Status::throwOnError(), and nnkit::support::onnx::TensorSet::type().
|
inlineoverridevirtual |
Reimplemented from nnkit::TensorContext.
Definition at line 64 of file TensorContext.h.
References nncc::core::ADT::tensor::make_overlay(), nnkit::support::onnx::TensorSet::mutable_tensor(), shape(), nnkit::support::onnx::Status::throwOnError(), and nnkit::support::onnx::TensorSet::type().
|
inlineoverridevirtual |
Reimplemented from nnkit::TensorContext.
Definition at line 59 of file TensorContext.h.
References nnkit::support::onnx::TensorSet::type().
|
inlineoverridevirtual |
Implements nnkit::TensorContext.
Definition at line 44 of file TensorContext.h.
References nnkit::support::onnx::TensorSet::name().
|
inlineoverridevirtual |
Implements nnkit::TensorContext.
Definition at line 46 of file TensorContext.h.
References nnkit::support::onnx::TensorSet::dim(), nncc::core::ADT::tensor::Shape::dim(), nncc::core::ADT::tensor::Shape::resize(), and shape().
Referenced by RandomDataGenerator.RandomDataGenerator::_gen_float32(), RandomDataGenerator.RandomDataGenerator::_gen_int16(), RandomDataGenerator.RandomDataGenerator::_gen_uint8(), getConstFloatTensor(), getMutableFloatTensor(), and shape().
|
inlineoverridevirtual |
Implements nnkit::TensorContext.
Definition at line 42 of file TensorContext.h.
References nnkit::support::onnx::TensorSet::size().