14 #include <arm_compute/core/Types.h>
18 using namespace armcomputetensorutils;
22 int CalcAxis(
const unsigned int axis,
const unsigned int inputDimensions)
24 const int intAxis = armnn::numeric_cast<int>(axis);
25 return armnn::numeric_cast<int>(inputDimensions) - intAxis;
33 std::vector<arm_compute::ITensorInfo*> aclInputPtrs;
34 arm_compute::TensorInfo aclInputInfo;
37 aclInputInfo = BuildArmComputeTensorInfo(*input);
38 aclInputPtrs.emplace_back(&aclInputInfo);
40 const arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output);
44 return arm_compute::CLStackLayer::validate(aclInputPtrs, aclAxis, &aclOutputInfo);
49 const arm_compute::CLCompileContext& clCompileContext)
58 std::vector<arm_compute::ICLTensor*> aclInputs;
61 arm_compute::ICLTensor& aclInput = armnn::PolymorphicPointerDowncast<IClTensorHandle>(input)->GetTensor();
62 aclInputs.emplace_back(&aclInput);
64 arm_compute::ICLTensor& output = armnn::PolymorphicPointerDowncast<IClTensorHandle>(
67 m_Layer.reset(
new arm_compute::CLStackLayer());
71 m_Layer->configure(clCompileContext, aclInputs, aclAxis, &output);