22 const unsigned int* subTensorOrigin)
25 const arm_compute::TensorShape shape = armcomputetensorutils::BuildArmComputeTensorShape(subTensorShape);
33 coords.set(i, armnn::numeric_cast<int>(subTensorOrigin[revertedIndex]));
36 const arm_compute::TensorShape parentShape = armcomputetensorutils::BuildArmComputeTensorShape(parent.
GetShape());
38 if (!::arm_compute::error_on_invalid_subtensor(__func__, __FILE__, __LINE__, parentShape, coords, shape))
43 return std::make_unique<NeonSubTensorHandle>(
44 PolymorphicDowncast<IAclTensorHandle*>(&parent), shape, coords);
59 const bool IsMemoryManaged)
const 61 auto tensorHandle = std::make_unique<NeonTensorHandle>(tensorInfo);
64 tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
67 tensorHandle->SetImportEnabledFlag(!IsMemoryManaged);
75 const bool IsMemoryManaged)
const 77 auto tensorHandle = std::make_unique<NeonTensorHandle>(tensorInfo, dataLayout);
80 tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
83 tensorHandle->SetImportEnabledFlag(!IsMemoryManaged);
112 return m_ExportFlags;
117 return m_ImportFlags;
126 std::vector<Capability> capabilities;
133 capabilities.push_back(paddingCapability);
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
MemorySourceFlags GetImportFlags() const override
CapabilityClass
Capability class to calculate in the GetCapabilities function so that only the capability in the scop...
std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo) const override
std::array< unsigned int, MaxNumOfTensorDimensions > Coordinates
unsigned int MemorySourceFlags
Copyright (c) 2021 ARM Limited and Contributors.
void IgnoreUnused(Ts &&...)
const std::set< armnn::LayerType > paddingRequiredLayers
Capability of the TensorHandleFactory.
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...
std::vector< Capability > GetCapabilities(const IConnectableLayer *layer, const IConnectableLayer *connectedLayer, CapabilityClass capabilityClass) override
bool SupportsSubTensors() const override
unsigned int GetNumDimensions() const
Function that returns the tensor rank.
bool SupportsInPlaceComputation() const override
static const FactoryId & GetIdStatic()
std::unique_ptr< ITensorHandle > CreateSubTensorHandle(ITensorHandle &parent, const TensorShape &subTensorShape, const unsigned int *subTensorOrigin) const override