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.
virtual TensorShape GetShape() const =0
Get the number of elements for each dimension ordered from slowest iterating dimension to fastest ite...
const FactoryId & GetId() const override
std::vector< Capability > GetCapabilities(const IConnectableLayer *layer, const IConnectableLayer *connectedLayer, CapabilityClass capabilityClass) override
std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo) const override
bool SupportsInPlaceComputation() const override
MemorySourceFlags GetExportFlags() const override
std::unique_ptr< ITensorHandle > CreateSubTensorHandle(ITensorHandle &parent, const TensorShape &subTensorShape, const unsigned int *subTensorOrigin) const override
MemorySourceFlags GetImportFlags() const override
static const FactoryId & GetIdStatic()
bool SupportsSubTensors() const override
unsigned int GetNumDimensions() const
Function that returns the tensor rank.
Copyright (c) 2021 ARM Limited and Contributors.
CapabilityClass
Capability class to calculate in the GetCapabilities function so that only the capability in the scop...
void IgnoreUnused(Ts &&...)
const std::set< armnn::LayerType > paddingRequiredLayers
unsigned int MemorySourceFlags
ITensorHandleFactory::FactoryId FactoryId
constexpr const char * NeonTensorHandleFactoryId()
std::array< unsigned int, MaxNumOfTensorDimensions > Coordinates
Capability of the TensorHandleFactory.