mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-18 06:20:51 +00:00
Fix FBA
This commit is contained in:
parent
8483dfa272
commit
e317dfb6e4
@ -102,44 +102,66 @@ struct BinaryOperationImplBase
|
|||||||
|
|
||||||
static void vectorVector(const A * __restrict a, const B * __restrict b, ResultType * __restrict c, size_t size)
|
static void vectorVector(const A * __restrict a, const B * __restrict b, ResultType * __restrict c, size_t size)
|
||||||
{
|
{
|
||||||
if (IsArchSupported(TargetArch::AVX512F))
|
if constexpr (UseMultitargetCode)
|
||||||
TargetSpecific::AVX512F::BinaryOperationImplBase<A, B, Op, ResultType>::vectorVector(a, b, c, size);
|
{
|
||||||
else if (IsArchSupported(TargetArch::AVX2))
|
if (IsArchSupported(TargetArch::AVX512F))
|
||||||
TargetSpecific::AVX2::BinaryOperationImplBase<A, B, Op, ResultType>::vectorVector(a, b, c, size);
|
TargetSpecific::AVX512F::BinaryOperationImplBase<A, B, Op, ResultType>::vectorVector(a, b, c, size);
|
||||||
else if (IsArchSupported(TargetArch::AVX))
|
else if (IsArchSupported(TargetArch::AVX2))
|
||||||
TargetSpecific::AVX::BinaryOperationImplBase<A, B, Op, ResultType>::vectorVector(a, b, c, size);
|
TargetSpecific::AVX2::BinaryOperationImplBase<A, B, Op, ResultType>::vectorVector(a, b, c, size);
|
||||||
else if (IsArchSupported(TargetArch::SSE42))
|
else if (IsArchSupported(TargetArch::AVX))
|
||||||
TargetSpecific::SSE42::BinaryOperationImplBase<A, B, Op, ResultType>::vectorVector(a, b, c, size);
|
TargetSpecific::AVX::BinaryOperationImplBase<A, B, Op, ResultType>::vectorVector(a, b, c, size);
|
||||||
|
else if (IsArchSupported(TargetArch::SSE42))
|
||||||
|
TargetSpecific::SSE42::BinaryOperationImplBase<A, B, Op, ResultType>::vectorVector(a, b, c, size);
|
||||||
|
else
|
||||||
|
TargetSpecific::Default::BinaryOperationImplBase<A, B, Op, ResultType>::vectorVector(a, b, c, size);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
TargetSpecific::Default::BinaryOperationImplBase<A, B, Op, ResultType>::vectorVector(a, b, c, size);
|
TargetSpecific::Default::BinaryOperationImplBase<A, B, Op, ResultType>::vectorVector(a, b, c, size);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vectorConstant(const A * __restrict a, B b, ResultType * __restrict c, size_t size)
|
static void vectorConstant(const A * __restrict a, B b, ResultType * __restrict c, size_t size)
|
||||||
{
|
{
|
||||||
if (IsArchSupported(TargetArch::AVX512F))
|
if constexpr (UseMultitargetCode)
|
||||||
TargetSpecific::AVX512F::BinaryOperationImplBase<A, B, Op, ResultType>::vectorConstant(a, b, c, size);
|
{
|
||||||
else if (IsArchSupported(TargetArch::AVX2))
|
if (IsArchSupported(TargetArch::AVX512F))
|
||||||
TargetSpecific::AVX2::BinaryOperationImplBase<A, B, Op, ResultType>::vectorConstant(a, b, c, size);
|
TargetSpecific::AVX512F::BinaryOperationImplBase<A, B, Op, ResultType>::vectorConstant(a, b, c, size);
|
||||||
else if (IsArchSupported(TargetArch::AVX))
|
else if (IsArchSupported(TargetArch::AVX2))
|
||||||
TargetSpecific::AVX::BinaryOperationImplBase<A, B, Op, ResultType>::vectorConstant(a, b, c, size);
|
TargetSpecific::AVX2::BinaryOperationImplBase<A, B, Op, ResultType>::vectorConstant(a, b, c, size);
|
||||||
else if (IsArchSupported(TargetArch::SSE42))
|
else if (IsArchSupported(TargetArch::AVX))
|
||||||
TargetSpecific::SSE42::BinaryOperationImplBase<A, B, Op, ResultType>::vectorConstant(a, b, c, size);
|
TargetSpecific::AVX::BinaryOperationImplBase<A, B, Op, ResultType>::vectorConstant(a, b, c, size);
|
||||||
|
else if (IsArchSupported(TargetArch::SSE42))
|
||||||
|
TargetSpecific::SSE42::BinaryOperationImplBase<A, B, Op, ResultType>::vectorConstant(a, b, c, size);
|
||||||
|
else
|
||||||
|
TargetSpecific::Default::BinaryOperationImplBase<A, B, Op, ResultType>::vectorConstant(a, b, c, size);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
TargetSpecific::Default::BinaryOperationImplBase<A, B, Op, ResultType>::vectorConstant(a, b, c, size);
|
TargetSpecific::Default::BinaryOperationImplBase<A, B, Op, ResultType>::vectorConstant(a, b, c, size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void constantVector(A a, const B * __restrict b, ResultType * __restrict c, size_t size)
|
static void constantVector(A a, const B * __restrict b, ResultType * __restrict c, size_t size)
|
||||||
{
|
{
|
||||||
if (IsArchSupported(TargetArch::AVX512F))
|
if constexpr (UseMultitargetCode)
|
||||||
TargetSpecific::AVX512F::BinaryOperationImplBase<A, B, Op, ResultType>::constantVector(a, b, c, size);
|
{
|
||||||
else if (IsArchSupported(TargetArch::AVX2))
|
if (IsArchSupported(TargetArch::AVX512F))
|
||||||
TargetSpecific::AVX2::BinaryOperationImplBase<A, B, Op, ResultType>::constantVector(a, b, c, size);
|
TargetSpecific::AVX512F::BinaryOperationImplBase<A, B, Op, ResultType>::constantVector(a, b, c, size);
|
||||||
else if (IsArchSupported(TargetArch::AVX))
|
else if (IsArchSupported(TargetArch::AVX2))
|
||||||
TargetSpecific::AVX::BinaryOperationImplBase<A, B, Op, ResultType>::constantVector(a, b, c, size);
|
TargetSpecific::AVX2::BinaryOperationImplBase<A, B, Op, ResultType>::constantVector(a, b, c, size);
|
||||||
else if (IsArchSupported(TargetArch::SSE42))
|
else if (IsArchSupported(TargetArch::AVX))
|
||||||
TargetSpecific::SSE42::BinaryOperationImplBase<A, B, Op, ResultType>::constantVector(a, b, c, size);
|
TargetSpecific::AVX::BinaryOperationImplBase<A, B, Op, ResultType>::constantVector(a, b, c, size);
|
||||||
|
else if (IsArchSupported(TargetArch::SSE42))
|
||||||
|
TargetSpecific::SSE42::BinaryOperationImplBase<A, B, Op, ResultType>::constantVector(a, b, c, size);
|
||||||
|
else
|
||||||
|
TargetSpecific::Default::BinaryOperationImplBase<A, B, Op, ResultType>::constantVector(a, b, c, size);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
TargetSpecific::Default::BinaryOperationImplBase<A, B, Op, ResultType>::constantVector(a, b, c, size);
|
TargetSpecific::Default::BinaryOperationImplBase<A, B, Op, ResultType>::constantVector(a, b, c, size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultType constantConstant(A a, B b)
|
static ResultType constantConstant(A a, B b)
|
||||||
|
Loading…
Reference in New Issue
Block a user