19 const unsigned int* subTensorOrigin)
22 const arm_compute::TensorShape shape = armcomputetensorutils::BuildArmComputeTensorShape(subTensorShape);
30 coords.set(i, boost::numeric_cast<int>(subTensorOrigin[revertedIndex]));
33 const arm_compute::TensorShape parentShape = armcomputetensorutils::BuildArmComputeTensorShape(parent.
GetShape());
34 if (!::arm_compute::error_on_invalid_subtensor(__func__, __FILE__, __LINE__, parentShape, coords, shape))
39 return std::make_unique<NeonSubTensorHandle>(
40 PolymorphicDowncast<IAclTensorHandle*>(&parent), shape, coords);
55 const bool IsMemoryManaged)
const 57 auto tensorHandle = std::make_unique<NeonTensorHandle>(tensorInfo);
60 tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
63 tensorHandle->SetImportEnabledFlag(!IsMemoryManaged);
71 const bool IsMemoryManaged)
const 73 auto tensorHandle = std::make_unique<NeonTensorHandle>(tensorInfo, dataLayout);
76 tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
79 tensorHandle->SetImportEnabledFlag(!IsMemoryManaged);
MemorySourceFlags GetImportFlags() const override
std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo) const override
std::array< unsigned int, MaxNumOfTensorDimensions > Coordinates
unsigned int MemorySourceFlags
Copyright (c) 2020 ARM Limited.
const FactoryId & GetId() const override
MemorySourceFlags GetExportFlags() const override
ITensorHandleFactory::FactoryId FactoryId
constexpr const char * NeonTensorHandleFactoryId()
virtual TensorShape GetShape() const =0
Get the number of elements for each dimension ordered from slowest iterating dimension to fastest ite...
bool SupportsSubTensors() const override
unsigned int GetNumDimensions() const
static const FactoryId & GetIdStatic()
std::unique_ptr< ITensorHandle > CreateSubTensorHandle(ITensorHandle &parent, const TensorShape &subTensorShape, const unsigned int *subTensorOrigin) const override