From 33fd07bd27be3cba183b7cacef63ea220c770c23 Mon Sep 17 00:00:00 2001 From: Ioan-Cristian Szabo Date: Thu, 26 Oct 2017 15:42:24 +0100 Subject: COMPMID-634: Enable clang with libc++ to compile for Android (32 and 64 bits) Change-Id: I693f64e70cd478e93675a8b04360128ded3b60d4 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/93015 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- arm_compute/core/NEON/kernels/NEAccumulateKernel.h | 6 +++--- arm_compute/core/NEON/kernels/NEActivationLayerKernel.h | 8 ++++---- arm_compute/core/NEON/kernels/NEBox3x3Kernel.h | 6 +++--- arm_compute/core/NEON/kernels/NECannyEdgeKernel.h | 6 +++--- arm_compute/core/NEON/kernels/NEHarrisCornersKernel.h | 6 +++--- arm_compute/core/NEON/kernels/NEMagnitudePhaseKernel.h | 6 +++--- arm_compute/core/NEON/kernels/NENonMaximaSuppression3x3Kernel.h | 6 +++--- arm_compute/core/NEON/kernels/arm64/NEGEMMLowpAArch64V8P4Kernel.h | 4 ++++ 8 files changed, 26 insertions(+), 22 deletions(-) (limited to 'arm_compute/core/NEON/kernels') diff --git a/arm_compute/core/NEON/kernels/NEAccumulateKernel.h b/arm_compute/core/NEON/kernels/NEAccumulateKernel.h index ad8b02fbc4..d6ad0be03e 100644 --- a/arm_compute/core/NEON/kernels/NEAccumulateKernel.h +++ b/arm_compute/core/NEON/kernels/NEAccumulateKernel.h @@ -80,7 +80,7 @@ protected: float _alpha; }; -#ifdef ARM_COMPUTE_ENABLE_FP16 +#ifdef ARM_COMPUTE_AARCH64_V8_2 /** Interface for the accumulate weighted kernel using F16 */ class NEAccumulateWeightedFP16Kernel : public NEAccumulateWeightedKernel { @@ -88,9 +88,9 @@ public: // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; }; -#else /* ARM_COMPUTE_ENABLE_FP16 */ +#else /* ARM_COMPUTE_AARCH64_V8_2 */ using NEAccumulateWeightedFP16Kernel = NEAccumulateWeightedKernel; -#endif /* ARM_COMPUTE_ENABLE_FP16 */ +#endif /* ARM_COMPUTE_AARCH64_V8_2 */ /** Interface for the accumulate squared kernel * diff --git a/arm_compute/core/NEON/kernels/NEActivationLayerKernel.h b/arm_compute/core/NEON/kernels/NEActivationLayerKernel.h index 08fb3f915d..e70dd454df 100644 --- a/arm_compute/core/NEON/kernels/NEActivationLayerKernel.h +++ b/arm_compute/core/NEON/kernels/NEActivationLayerKernel.h @@ -27,9 +27,9 @@ #include "arm_compute/core/FixedPoint.h" #include "arm_compute/core/NEON/INEKernel.h" -#ifdef ARM_COMPUTE_ENABLE_FP16 +#ifdef ARM_COMPUTE_AARCH64_V8_2 #include -#endif /* ARM_COMPUTE_ENABLE_FP16 */ +#endif /* ARM_COMPUTE_AARCH64_V8_2 */ namespace arm_compute { @@ -76,14 +76,14 @@ private: */ template typename std::enable_if::value, void>::type activation(const Window &window); -#ifdef ARM_COMPUTE_ENABLE_FP16 +#ifdef ARM_COMPUTE_AARCH64_V8_2 /** Function to apply an activation function on a tensor. * * @param[in] window Region on which to execute the kernel */ template typename std::enable_if::value, void>::type activation(const Window &window); -#endif /* ARM_COMPUTE_ENABLE_FP16 */ +#endif /* ARM_COMPUTE_AARCH64_V8_2 */ /** Function to apply an activation function on a tensor. * * @param[in] window Region on which to execute the kernel diff --git a/arm_compute/core/NEON/kernels/NEBox3x3Kernel.h b/arm_compute/core/NEON/kernels/NEBox3x3Kernel.h index 1366adad3b..a53e4d77f7 100644 --- a/arm_compute/core/NEON/kernels/NEBox3x3Kernel.h +++ b/arm_compute/core/NEON/kernels/NEBox3x3Kernel.h @@ -46,7 +46,7 @@ public: BorderSize border_size() const override; }; -#ifdef ARM_COMPUTE_ENABLE_FP16 +#ifdef ARM_COMPUTE_AARCH64_V8_2 /** NEON kernel to perform a Box 3x3 filter using F16 simd */ class NEBox3x3FP16Kernel : public NEBox3x3Kernel @@ -55,8 +55,8 @@ public: // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; }; -#else /* ARM_COMPUTE_ENABLE_FP16 */ +#else /* ARM_COMPUTE_AARCH64_V8_2 */ using NEBox3x3FP16Kernel = NEBox3x3Kernel; -#endif /* ARM_COMPUTE_ENABLE_FP16 */ +#endif /* ARM_COMPUTE_AARCH64_V8_2 */ } // namespace arm_compute #endif /*__ARM_COMPUTE_NEBOX3x3KERNEL_H__ */ diff --git a/arm_compute/core/NEON/kernels/NECannyEdgeKernel.h b/arm_compute/core/NEON/kernels/NECannyEdgeKernel.h index 37d86685d3..4f1a1f32dc 100644 --- a/arm_compute/core/NEON/kernels/NECannyEdgeKernel.h +++ b/arm_compute/core/NEON/kernels/NECannyEdgeKernel.h @@ -81,7 +81,7 @@ protected: ITensor *_phase; /**< Destination tensor - Quantized phase */ }; -#ifdef ARM_COMPUTE_ENABLE_FP16 +#ifdef ARM_COMPUTE_AARCH64_V8_2 /** NEON kernel to perform Gradient computation */ class NEGradientFP16Kernel : public NEGradientKernel @@ -90,9 +90,9 @@ public: // Inherited methods overriden: void configure(const ITensor *gx, const ITensor *gy, ITensor *magnitude, ITensor *phase, int32_t norm_type) override; }; -#else /* ARM_COMPUTE_ENABLE_FP16 */ +#else /* ARM_COMPUTE_AARCH64_V8_2 */ using NEGradientFP16Kernel = NEGradientKernel; -#endif /* ARM_COMPUTE_ENABLE_FP16 */ +#endif /* ARM_COMPUTE_AARCH64_V8_2 */ /** NEON kernel to perform Non-Maxima suppression for Canny Edge. * diff --git a/arm_compute/core/NEON/kernels/NEHarrisCornersKernel.h b/arm_compute/core/NEON/kernels/NEHarrisCornersKernel.h index 2aef420e42..cfa5220c4d 100644 --- a/arm_compute/core/NEON/kernels/NEHarrisCornersKernel.h +++ b/arm_compute/core/NEON/kernels/NEHarrisCornersKernel.h @@ -99,7 +99,7 @@ private: HarrisScoreFunction *_func; }; -#ifdef ARM_COMPUTE_ENABLE_FP16 +#ifdef ARM_COMPUTE_AARCH64_V8_2 /** Interface for the accumulate Weighted kernel using F16 */ template class NEHarrisScoreFP16Kernel : public INEHarrisScoreKernel @@ -118,9 +118,9 @@ private: /** Harris Score function to use for the particular image types passed to configure() */ HarrisScoreFunction *_func; }; -#else /* ARM_COMPUTE_ENABLE_FP16 */ +#else /* ARM_COMPUTE_AARCH64_V8_2 */ template using NEHarrisScoreFP16Kernel = NEHarrisScoreKernel; -#endif /* ARM_COMPUTE_ENABLE_FP16 */ +#endif /* ARM_COMPUTE_AARCH64_V8_2 */ } // namespace arm_compute #endif /* __ARM_COMPUTE_NEHARRISCORNERSKERNEL_H__ */ diff --git a/arm_compute/core/NEON/kernels/NEMagnitudePhaseKernel.h b/arm_compute/core/NEON/kernels/NEMagnitudePhaseKernel.h index b853d22456..fba8d8dd39 100644 --- a/arm_compute/core/NEON/kernels/NEMagnitudePhaseKernel.h +++ b/arm_compute/core/NEON/kernels/NEMagnitudePhaseKernel.h @@ -94,7 +94,7 @@ private: ITensor *_phase; /**< Output - Phase */ }; -#ifdef ARM_COMPUTE_ENABLE_FP16 +#ifdef ARM_COMPUTE_AARCH64_V8_2 /** Template interface for the kernel to compute magnitude and phase */ template class NEMagnitudePhaseFP16Kernel : public INEKernel @@ -156,9 +156,9 @@ private: ITensor *_magnitude; /**< Output - Magnitude */ ITensor *_phase; /**< Output - Phase */ }; -#else /* ARM_COMPUTE_ENABLE_FP16 */ +#else /* ARM_COMPUTE_AARCH64_V8_2 */ template using NEMagnitudePhaseFP16Kernel = NEMagnitudePhaseKernel; -#endif /* ARM_COMPUTE_ENABLE_FP16 */ +#endif /* ARM_COMPUTE_AARCH64_V8_2 */ } // namespace arm_compute #endif /* __ARM_COMPUTE_NEMAGNITUDEPHASEKERNEL_H__ */ diff --git a/arm_compute/core/NEON/kernels/NENonMaximaSuppression3x3Kernel.h b/arm_compute/core/NEON/kernels/NENonMaximaSuppression3x3Kernel.h index 3bce1a99f3..f47b487c91 100644 --- a/arm_compute/core/NEON/kernels/NENonMaximaSuppression3x3Kernel.h +++ b/arm_compute/core/NEON/kernels/NENonMaximaSuppression3x3Kernel.h @@ -78,7 +78,7 @@ protected: ITensor *_output; /**< Destination tensor */ }; -#ifdef ARM_COMPUTE_ENABLE_FP16 +#ifdef ARM_COMPUTE_AARCH64_V8_2 /** NEON kernel to perform Non-Maxima suppression 3x3 with intermediate results in F16 if the input data type is F32 */ class NENonMaximaSuppression3x3FP16Kernel : public NENonMaximaSuppression3x3Kernel @@ -92,8 +92,8 @@ public: */ void configure(const ITensor *input, ITensor *output, bool border_undefined); }; -#else /* ARM_COMPUTE_ENABLE_FP16 */ +#else /* ARM_COMPUTE_AARCH64_V8_2 */ using NENonMaximaSuppression3x3FP16Kernel = NENonMaximaSuppression3x3Kernel; -#endif /* ARM_COMPUTE_ENABLE_FP16 */ +#endif /* ARM_COMPUTE_AARCH64_V8_2 */ } // namespace arm_compute #endif /* _ARM_COMPUTE_NENONMAXIMASUPPRESSION3x3KERNEL_H__ */ diff --git a/arm_compute/core/NEON/kernels/arm64/NEGEMMLowpAArch64V8P4Kernel.h b/arm_compute/core/NEON/kernels/arm64/NEGEMMLowpAArch64V8P4Kernel.h index f218e1f006..4eab7f91fc 100644 --- a/arm_compute/core/NEON/kernels/arm64/NEGEMMLowpAArch64V8P4Kernel.h +++ b/arm_compute/core/NEON/kernels/arm64/NEGEMMLowpAArch64V8P4Kernel.h @@ -26,6 +26,9 @@ #include "arm_compute/core/NEON/kernels/NEGEMMLowpAssemblyBaseKernel.h" +// Enable only if compiled for AArch64-V8.2-A targets +#ifdef ARM_COMPUTE_AARCH64_V8_2 + namespace arm_compute { class ITensor; @@ -42,4 +45,5 @@ protected: void internal_configure(const ITensor *input0, const ITensor *input1, ITensor *output) override; }; } // namespace arm_compute +#endif /* ARM_COMPUTE_AARCH64_V8_2 */ #endif /*__ARM_COMPUTE_NEGEMMLOWPAARCH64V8P4KERNEL_H__*/ -- cgit v1.2.1