12 #include <arm_compute/core/Coordinates.h>
13 #include <arm_compute/runtime/CL/CLSubTensor.h>
14 #include <arm_compute/runtime/CL/CLTensor.h>
23 const unsigned int* subTensorOrigin)
const
26 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());
40 if (coords.x() != 0 || coords.y() != 0)
44 if ((parentShape.x() != shape.x()) || (parentShape.y() != shape.y()))
49 if (!::arm_compute::error_on_invalid_subtensor(__func__, __FILE__, __LINE__, parentShape, coords, shape))
54 return std::make_unique<ClSubTensorHandle>(PolymorphicDowncast<IClTensorHandle*>(&parent), shape, coords);
69 const bool IsMemoryManaged)
const
71 std::unique_ptr<ClTensorHandle> tensorHandle = std::make_unique<ClTensorHandle>(tensorInfo);
74 ARMNN_LOG(
warning) <<
"ClTensorHandleFactory only has support for memory managed.";
76 tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
82 const bool IsMemoryManaged)
const
84 std::unique_ptr<ClTensorHandle> tensorHandle = std::make_unique<ClTensorHandle>(tensorInfo, dataLayout);
87 ARMNN_LOG(
warning) <<
"ClTensorHandleFactory only has support for memory managed.";
89 tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());