13 #include <arm_compute/core/Coordinates.h>
14 #include <arm_compute/runtime/CL/CLSubTensor.h>
15 #include <arm_compute/runtime/CL/CLTensor.h>
24 const unsigned int* subTensorOrigin)
const
27 arm_compute::TensorShape shape = armcomputetensorutils::BuildArmComputeTensorShape(subTensorShape);
34 coords.set(i, armnn::numeric_cast<int>(subTensorOrigin[revertedIndex]));
37 const arm_compute::TensorShape parentShape = armcomputetensorutils::BuildArmComputeTensorShape(parent.
GetShape());
41 if (coords.x() != 0 || coords.y() != 0)
45 if ((parentShape.x() != shape.x()) || (parentShape.y() != shape.y()))
50 if (!::arm_compute::error_on_invalid_subtensor(__func__, __FILE__, __LINE__, parentShape, coords, shape))
55 return std::make_unique<ClSubTensorHandle>(PolymorphicDowncast<IClTensorHandle*>(&parent), shape, coords);
70 const bool IsMemoryManaged)
const
72 std::unique_ptr<ClTensorHandle> tensorHandle = std::make_unique<ClTensorHandle>(tensorInfo);
75 ARMNN_LOG(
warning) <<
"ClTensorHandleFactory only has support for memory managed.";
77 tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
83 const bool IsMemoryManaged)
const
85 std::unique_ptr<ClTensorHandle> tensorHandle = std::make_unique<ClTensorHandle>(tensorInfo, dataLayout);
88 ARMNN_LOG(
warning) <<
"ClTensorHandleFactory only has support for memory managed.";
90 tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());