1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Rename cmpGt2

This commit is contained in:
Andrey Piskunov
2022-08-04 16:16:12 +03:00
parent 24b2c1c283
commit c3a5731890
3 changed files with 34 additions and 34 deletions

View File

@ -1285,10 +1285,10 @@ void vectorizedUpdateMinMax(const bool validMinMax, const MT nonNullOrEmptyMask,
if (validMinMax) if (validMinMax)
{ {
auto byteMask = utils::bitCast<SimdType>(simd::bitMaskToByteMask16(nonNullOrEmptyMask)); auto byteMask = utils::bitCast<SimdType>(simd::bitMaskToByteMask16(nonNullOrEmptyMask));
simdMin = simdProcessor.blend(simdMin, dataVec, simdMin = simdProcessor.blend(
simdProcessor.bwAnd(simdProcessor.cmpGt2(simdMin, dataVec), byteMask)); simdMin, dataVec, simdProcessor.bwAnd(simdProcessor.cmpGtSimdType(simdMin, dataVec), byteMask));
simdMax = simdProcessor.blend(simdMax, dataVec, simdMax = simdProcessor.blend(
simdProcessor.bwAnd(simdProcessor.cmpGt2(dataVec, simdMax), byteMask)); simdMax, dataVec, simdProcessor.bwAnd(simdProcessor.cmpGtSimdType(dataVec, simdMax), byteMask));
} }
} }
@ -1300,8 +1300,8 @@ void vectorizedTextUpdateMinMax(const bool validMinMax, const MT nonNullOrEmptyM
if (validMinMax) if (validMinMax)
{ {
auto byteMask = utils::bitCast<SimdType>(simd::bitMaskToByteMask16(nonNullOrEmptyMask)); auto byteMask = utils::bitCast<SimdType>(simd::bitMaskToByteMask16(nonNullOrEmptyMask));
auto minComp = simdProcessor.bwAnd(simdProcessor.cmpGt2(weightsMin, swapedOrderDataVec), byteMask); auto minComp = simdProcessor.bwAnd(simdProcessor.cmpGtSimdType(weightsMin, swapedOrderDataVec), byteMask);
auto maxComp = simdProcessor.bwAnd(simdProcessor.cmpGt2(swapedOrderDataVec, weightsMax), byteMask); auto maxComp = simdProcessor.bwAnd(simdProcessor.cmpGtSimdType(swapedOrderDataVec, weightsMax), byteMask);
simdMin = simdProcessor.blend(simdMin, dataVec, minComp); simdMin = simdProcessor.blend(simdMin, dataVec, minComp);
weightsMin = simdProcessor.blend(weightsMin, swapedOrderDataVec, minComp); weightsMin = simdProcessor.blend(weightsMin, swapedOrderDataVec, minComp);
simdMax = simdProcessor.blend(simdMax, dataVec, maxComp); simdMax = simdProcessor.blend(simdMax, dataVec, maxComp);

View File

@ -205,14 +205,14 @@ struct TypeToVecWrapperType<T, typename std::enable_if<std::is_same_v<double, T>
using WrapperType = vi128d_wr; using WrapperType = vi128d_wr;
}; };
template <typename T> template <typename T>
struct TypeToVecWrapperType<T, typename std::enable_if<std::is_unsigned_v<T> >::type> struct TypeToVecWrapperType<T, typename std::enable_if<std::is_unsigned_v<T> >::type>
: WidthToVecWrapperType<sizeof(T)> : WidthToVecWrapperType<sizeof(T)>
{ {
}; };
template <typename T> template <typename T>
struct TypeToVecWrapperType< struct TypeToVecWrapperType<
T, typename std::enable_if<std::is_signed_v<T> &&!is_floating_point_v<T>>::type> T, typename std::enable_if<std::is_signed_v<T> &&!is_floating_point_v<T>>::type>
: WidthToSVecWrapperType<sizeof(T)> : WidthToSVecWrapperType<sizeof(T)>
{ {
}; };
@ -367,7 +367,7 @@ class SimdFilterProcessor<
{ {
return vbslq_s32((uint32x4_t)mask, y,x); return vbslq_s32((uint32x4_t)mask, y,x);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return (SimdType)vcgtq_s32(x, y); return (SimdType)vcgtq_s32(x, y);
} }
@ -533,7 +533,7 @@ class SimdFilterProcessor<
{ {
return vminvq_f64(x); return vminvq_f64(x);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return (SimdType)vcgtq_f64(x, y); return (SimdType)vcgtq_f64(x, y);
} }
@ -638,7 +638,7 @@ class SimdFilterProcessor<
{ {
return vbslq_f32((uint32x4_t)mask, y,x); return vbslq_f32((uint32x4_t)mask, y,x);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return (SimdType)vcgtq_f32(x, y); return (SimdType)vcgtq_f32(x, y);
} }
@ -792,7 +792,7 @@ class SimdFilterProcessor<
{ {
return vandq_s64(x, y); return vandq_s64(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return (SimdType)vcgtq_s64(x, y); return (SimdType)vcgtq_s64(x, y);
} }
@ -908,7 +908,7 @@ class SimdFilterProcessor<
{ {
return vbslq_u64((uint64x2_t)mask, y,x); return vbslq_u64((uint64x2_t)mask, y,x);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return (SimdType)vcgtq_u64(x, y); return (SimdType)vcgtq_u64(x, y);
} }
@ -1041,7 +1041,7 @@ class SimdFilterProcessor<
{ {
return vbslq_s32((uint32x4_t)mask, y,x); return vbslq_s32((uint32x4_t)mask, y,x);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return (SimdType)vcgtq_s32(x, y); return (SimdType)vcgtq_s32(x, y);
} }
@ -1174,7 +1174,7 @@ class SimdFilterProcessor<
{ {
return vbslq_u32((uint32x4_t)mask, y,x); return vbslq_u32((uint32x4_t)mask, y,x);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return (SimdType)vcgtq_u32(x, y); return (SimdType)vcgtq_u32(x, y);
} }
@ -1316,7 +1316,7 @@ class SimdFilterProcessor<
{ {
return vandq_s16(x, y); return vandq_s16(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return (SimdType)vcgtq_s16(x, y); return (SimdType)vcgtq_s16(x, y);
} }
@ -1425,7 +1425,7 @@ class SimdFilterProcessor<VT, CHECK_T,
{ {
return vdupq_n_u16(fill); return vdupq_n_u16(fill);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return (SimdType)vcgtq_u16(x, y); return (SimdType)vcgtq_u16(x, y);
} }
@ -1566,7 +1566,7 @@ class SimdFilterProcessor<
{ {
return vmaxvq_s8(x); return vmaxvq_s8(x);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return (SimdType)vcgtq_s8(x, y); return (SimdType)vcgtq_s8(x, y);
} }
@ -1714,7 +1714,7 @@ class SimdFilterProcessor<
{ {
return vandq_u8(x, y); return vandq_u8(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return (SimdType)vcgtq_u8(x, y); return (SimdType)vcgtq_u8(x, y);
} }

View File

@ -260,7 +260,7 @@ class SimdFilterProcessor<
return x; return x;
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return x; return x;
} }
@ -404,7 +404,7 @@ class SimdFilterProcessor<
return _mm_blendv_pd(x, y, mask); return _mm_blendv_pd(x, y, mask);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return _mm_cmpgt_pd(x, y); return _mm_cmpgt_pd(x, y);
} }
@ -538,7 +538,7 @@ class SimdFilterProcessor<
return _mm_max_ps(x, y); return _mm_max_ps(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return _mm_cmpgt_ps(x, y); return _mm_cmpgt_ps(x, y);
} }
@ -670,19 +670,19 @@ class SimdFilterProcessor<VT, CHECK_T,
return _mm_and_si128(x, y); return _mm_and_si128(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return _mm_cmpgt_epi64(x, y); return _mm_cmpgt_epi64(x, y);
} }
MCS_FORCE_INLINE SimdType min(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType min(SimdType x, SimdType y) const
{ {
return blend(x, y, cmpGt2(x,y)); return blend(x, y, cmpGtSimdType(x,y));
} }
MCS_FORCE_INLINE SimdType max(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType max(SimdType x, SimdType y) const
{ {
return blend(x, y, cmpGt2(y,x)); return blend(x, y, cmpGtSimdType(y,x));
} }
}; };
@ -805,7 +805,7 @@ class SimdFilterProcessor<VT, CHECK_T,
return _mm_and_si128(x, y); return _mm_and_si128(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
SimdType signVec = constant4i<0,(int32_t)0x80000000,0,(int32_t)0x80000000>(); SimdType signVec = constant4i<0,(int32_t)0x80000000,0,(int32_t)0x80000000>();
SimdType xFlip = _mm_xor_si128(x, signVec); SimdType xFlip = _mm_xor_si128(x, signVec);
@ -815,12 +815,12 @@ class SimdFilterProcessor<VT, CHECK_T,
MCS_FORCE_INLINE SimdType min(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType min(SimdType x, SimdType y) const
{ {
return blend(x, y, cmpGt2(x,y)); return blend(x, y, cmpGtSimdType(x,y));
} }
MCS_FORCE_INLINE SimdType max(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType max(SimdType x, SimdType y) const
{ {
return blend(x, y, cmpGt2(y,x)); return blend(x, y, cmpGtSimdType(y,x));
} }
}; };
@ -940,7 +940,7 @@ class SimdFilterProcessor<VT, CHECK_T,
return _mm_and_si128(x, y); return _mm_and_si128(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return _mm_cmpgt_epi32(x, y); return _mm_cmpgt_epi32(x, y);
} }
@ -1075,7 +1075,7 @@ class SimdFilterProcessor<VT, CHECK_T,
return _mm_and_si128(x, y); return _mm_and_si128(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
SimdType signVec = constant4i<(int32_t)0x80000000,(int32_t)0x80000000,(int32_t)0x80000000,(int32_t)0x80000000>(); SimdType signVec = constant4i<(int32_t)0x80000000,(int32_t)0x80000000,(int32_t)0x80000000,(int32_t)0x80000000>();
SimdType xFlip = _mm_xor_si128(x, signVec); SimdType xFlip = _mm_xor_si128(x, signVec);
@ -1209,7 +1209,7 @@ class SimdFilterProcessor<
return _mm_and_si128(x, y); return _mm_and_si128(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return _mm_cmpgt_epi16(x, y); return _mm_cmpgt_epi16(x, y);
} }
@ -1341,7 +1341,7 @@ class SimdFilterProcessor<
return _mm_and_si128(x, y); return _mm_and_si128(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y)
{ {
SimdType ones = SimdType ones =
constant4i<(int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF>(); constant4i<(int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF>();
@ -1482,7 +1482,7 @@ class SimdFilterProcessor<
return _mm_and_si128(x, y); return _mm_and_si128(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) const MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y) const
{ {
return _mm_cmpgt_epi8(x, y); return _mm_cmpgt_epi8(x, y);
} }
@ -1621,7 +1621,7 @@ class SimdFilterProcessor<
return _mm_and_si128(x, y); return _mm_and_si128(x, y);
} }
MCS_FORCE_INLINE SimdType cmpGt2(SimdType x, SimdType y) MCS_FORCE_INLINE SimdType cmpGtSimdType(SimdType x, SimdType y)
{ {
SimdType ones = SimdType ones =
constant4i<(int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF>(); constant4i<(int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF, (int32_t)0xFFFFFFFF>();