fix linaro build (#355)

This commit is contained in:
Tracy Sharpe 2019-01-18 16:11:53 -08:00 committed by GitHub
parent 0a21226b09
commit 22337bb641
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 12 deletions

View file

@ -113,9 +113,7 @@ struct MLAS_ACTIVATION_FUNCTION<MlasReluActivation>
template<>
struct MLAS_ACTIVATION_FUNCTION<MlasLeakyReluActivation>
{
#if defined(MLAS_SSE2_INTRINSICS)
const MLAS_FLOAT32X4 ZeroFloat32x4 = MlasZeroFloat32x4();
#endif
MLAS_FLOAT32X4 AlphaBroadcast;
@ -129,7 +127,12 @@ struct MLAS_ACTIVATION_FUNCTION<MlasLeakyReluActivation>
MLAS_FLOAT32X4 ValueTimesAlpha = MlasMultiplyFloat32x4(Value, AlphaBroadcast);
#if defined(MLAS_NEON_INTRINSICS)
return vbslq_f32(vclezq_f32(Value), ValueTimesAlpha, Value);
#if defined(_WIN32)
return vbslq_f32(vcleq_z_f32_ex(Value), ValueTimesAlpha, Value);
#else
// N.B. Standard NEON headers lack an intrinsic for the "vcle #0" form.
return vbslq_f32(vcleq_f32(Value, ZeroFloat32x4), ValueTimesAlpha, Value);
#endif
#elif defined(MLAS_AVX_INTRINSICS)
return _mm_blendv_ps(ValueTimesAlpha, Value, _mm_cmple_ps(ZeroFloat32x4, Value));
#elif defined(MLAS_SSE2_INTRINSICS)

View file

@ -327,15 +327,6 @@ MlasExecuteThreaded(
#endif
#endif
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64)
#ifndef vcgezq_f32
#define vcgezq_f32(src) vcgeq_z_f32_ex(src)
#endif
#ifndef vclezq_f32
#define vclezq_f32(src) vcleq_z_f32_ex(src)
#endif
#endif
//
// Cross-platform wrappers for vector intrinsics.
//