mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
POWER: Fix compilation issues with clang
This patch fixes some compilation errors when using clang11 on POWER processors.
This commit is contained in:
parent
73fe7bfa0f
commit
33a97e995b
1 changed files with 6 additions and 4 deletions
|
|
@ -1333,7 +1333,7 @@ MlasStoreLowHalfFloat32x4(float* Buffer, MLAS_FLOAT32X4 Vector)
|
|||
#elif defined(MLAS_SSE2_INTRINSICS)
|
||||
_mm_storel_pi((__m64*)Buffer, Vector);
|
||||
#elif defined(MLAS_VSX_INTRINSICS)
|
||||
*((int64_t*)Buffer) = ((__vector int64_t)Vector)[0];
|
||||
*((long long*)Buffer) = ((__vector long long)Vector)[0];
|
||||
#else
|
||||
MlasStoreLaneFloat32x4<0>(&Buffer[0], Vector);
|
||||
MlasStoreLaneFloat32x4<1>(&Buffer[1], Vector);
|
||||
|
|
@ -1555,6 +1555,8 @@ MlasGreaterThanFloat32x4(MLAS_FLOAT32X4 Vector1, MLAS_FLOAT32X4 Vector2)
|
|||
return _mm_cmpgt_ps(Vector1, Vector2);
|
||||
#elif defined(MLAS_WASM_SIMD_INTRINSICS)
|
||||
return wasm_f32x4_gt(Vector1, Vector2);
|
||||
#elif defined(MLAS_VSX_INTRINSICS)
|
||||
return MLAS_FLOAT32X4(vec_cmpgt(Vector1, Vector2));
|
||||
#else
|
||||
return Vector1 > Vector2;
|
||||
#endif
|
||||
|
|
@ -1681,7 +1683,7 @@ MlasReduceAddFloat32x4(MLAS_FLOAT32X4 Vector)
|
|||
VectorLow = vpadd_f32(VectorLow, VectorHigh);
|
||||
return vget_lane_f32(VectorLow, 0);
|
||||
#elif defined(MLAS_VSX_INTRINSICS)
|
||||
Vector = MlasAddFloat32x4(Vector, MLAS_FLOAT32X4(vec_splat((__vector int64_t)Vector, 1)));
|
||||
Vector = MlasAddFloat32x4(Vector, MLAS_FLOAT32X4(vec_splat((__vector long long)Vector, 1)));
|
||||
Vector = MlasAddFloat32x4(Vector, vec_splat(Vector, 1));
|
||||
return Vector[0];
|
||||
#else
|
||||
|
|
@ -1704,7 +1706,7 @@ MlasReduceMaximumFloat32x4(MLAS_FLOAT32X4 Vector)
|
|||
VectorLow = vpmax_f32(VectorLow, VectorHigh);
|
||||
return vget_lane_f32(VectorLow, 0);
|
||||
#elif defined(MLAS_VSX_INTRINSICS)
|
||||
Vector = MlasMaximumFloat32x4(Vector, MLAS_FLOAT32X4(vec_splat((__vector int64_t)Vector, 1)));
|
||||
Vector = MlasMaximumFloat32x4(Vector, MLAS_FLOAT32X4(vec_splat((__vector long long)Vector, 1)));
|
||||
Vector = MlasMaximumFloat32x4(Vector, vec_splat(Vector, 1));
|
||||
return Vector[0];
|
||||
#else
|
||||
|
|
@ -1727,7 +1729,7 @@ MlasReduceMinimumFloat32x4(MLAS_FLOAT32X4 Vector)
|
|||
VectorLow = vpmin_f32(VectorLow, VectorHigh);
|
||||
return vget_lane_f32(VectorLow, 0);
|
||||
#elif defined(MLAS_VSX_INTRINSICS)
|
||||
Vector = MlasMinimumFloat32x4(Vector, MLAS_FLOAT32X4(vec_splat((__vector int64_t)Vector, 1)));
|
||||
Vector = MlasMinimumFloat32x4(Vector, MLAS_FLOAT32X4(vec_splat((__vector long long)Vector, 1)));
|
||||
Vector = MlasMinimumFloat32x4(Vector, vec_splat(Vector, 1));
|
||||
return Vector[0];
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in a new issue