/root/doris/be/src/vec/functions/if.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | // This file is copied from |
18 | | // https://github.com/ClickHouse/ClickHouse/blob/master/src/Functions/If.cpp |
19 | | // and modified by Doris |
20 | | |
21 | | #include <glog/logging.h> |
22 | | #include <stddef.h> |
23 | | |
24 | | #include <boost/iterator/iterator_facade.hpp> |
25 | | |
26 | | #include "vec/columns/column.h" |
27 | | #include "vec/columns/column_vector.h" |
28 | | #include "vec/common/pod_array_fwd.h" |
29 | | #include "vec/core/types.h" |
30 | | #include "vec/data_types/data_type.h" |
31 | | #include "vec/functions/function_helpers.h" |
32 | | |
33 | | #ifdef __ARM_NEON |
34 | | #include <arm_acle.h> |
35 | | #include <arm_neon.h> |
36 | | #endif |
37 | | |
38 | | namespace doris::vectorized { |
39 | | |
40 | | template <PrimitiveType PType> |
41 | | struct NumIfImpl { |
42 | | private: |
43 | | using Type = typename PrimitiveTypeTraits<PType>::ColumnItemType; |
44 | | using ArrayCond = PaddedPODArray<UInt8>; |
45 | | using Array = PaddedPODArray<Type>; |
46 | | using ColVecResult = ColumnVector<PType>; |
47 | | using ColVecT = ColumnVector<PType>; |
48 | | |
49 | | public: |
50 | 28 | static const Array& get_data_from_column_const(const ColumnConst* column) { |
51 | 28 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); |
52 | 28 | } _ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE5EE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 50 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 51 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 52 | 4 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE3EE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 50 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 51 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 52 | 4 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE4EE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 50 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 51 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 52 | 4 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE6EE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 50 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 51 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 52 | 4 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE7EE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 50 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 51 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 52 | 4 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE8EE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 50 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 51 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 52 | 4 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE9EE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 50 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 51 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 52 | 4 | } |
|
53 | | |
54 | | static ColumnPtr execute_if(const ArrayCond& cond, const ColumnPtr& then_col, |
55 | 33 | const ColumnPtr& else_col) { |
56 | 33 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { |
57 | 19 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { |
58 | 12 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); |
59 | 12 | } else if (const auto* col_const_else = |
60 | 7 | check_and_get_column_const<ColVecT>(else_col.get())) { |
61 | 7 | return execute_impl<false, true>(cond, col_then->get_data(), |
62 | 7 | get_data_from_column_const(col_const_else)); |
63 | 7 | } |
64 | 19 | } else if (const auto* col_const_then = |
65 | 14 | check_and_get_column_const<ColVecT>(then_col.get())) { |
66 | 14 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { |
67 | 7 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), |
68 | 7 | col_else->get_data()); |
69 | 7 | } else if (const auto* col_const_else = |
70 | 7 | check_and_get_column_const<ColVecT>(else_col.get())) { |
71 | 7 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), |
72 | 7 | get_data_from_column_const(col_const_else)); |
73 | 7 | } |
74 | 14 | } |
75 | 0 | return nullptr; |
76 | 33 | } _ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE5EE10execute_ifERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISC_EESH_ Line | Count | Source | 55 | 8 | const ColumnPtr& else_col) { | 56 | 8 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 57 | 6 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 58 | 5 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 59 | 5 | } else if (const auto* col_const_else = | 60 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 61 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 62 | 1 | get_data_from_column_const(col_const_else)); | 63 | 1 | } | 64 | 6 | } else if (const auto* col_const_then = | 65 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 66 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 67 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 68 | 1 | col_else->get_data()); | 69 | 1 | } else if (const auto* col_const_else = | 70 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 71 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 72 | 1 | get_data_from_column_const(col_const_else)); | 73 | 1 | } | 74 | 2 | } | 75 | 0 | return nullptr; | 76 | 8 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE3EE10execute_ifERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISC_EESH_ Line | Count | Source | 55 | 4 | const ColumnPtr& else_col) { | 56 | 4 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 57 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 58 | 1 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 59 | 1 | } else if (const auto* col_const_else = | 60 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 61 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 62 | 1 | get_data_from_column_const(col_const_else)); | 63 | 1 | } | 64 | 2 | } else if (const auto* col_const_then = | 65 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 66 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 67 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 68 | 1 | col_else->get_data()); | 69 | 1 | } else if (const auto* col_const_else = | 70 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 71 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 72 | 1 | get_data_from_column_const(col_const_else)); | 73 | 1 | } | 74 | 2 | } | 75 | 0 | return nullptr; | 76 | 4 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE4EE10execute_ifERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISC_EESH_ Line | Count | Source | 55 | 4 | const ColumnPtr& else_col) { | 56 | 4 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 57 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 58 | 1 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 59 | 1 | } else if (const auto* col_const_else = | 60 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 61 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 62 | 1 | get_data_from_column_const(col_const_else)); | 63 | 1 | } | 64 | 2 | } else if (const auto* col_const_then = | 65 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 66 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 67 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 68 | 1 | col_else->get_data()); | 69 | 1 | } else if (const auto* col_const_else = | 70 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 71 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 72 | 1 | get_data_from_column_const(col_const_else)); | 73 | 1 | } | 74 | 2 | } | 75 | 0 | return nullptr; | 76 | 4 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE6EE10execute_ifERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISC_EESH_ Line | Count | Source | 55 | 4 | const ColumnPtr& else_col) { | 56 | 4 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 57 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 58 | 1 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 59 | 1 | } else if (const auto* col_const_else = | 60 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 61 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 62 | 1 | get_data_from_column_const(col_const_else)); | 63 | 1 | } | 64 | 2 | } else if (const auto* col_const_then = | 65 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 66 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 67 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 68 | 1 | col_else->get_data()); | 69 | 1 | } else if (const auto* col_const_else = | 70 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 71 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 72 | 1 | get_data_from_column_const(col_const_else)); | 73 | 1 | } | 74 | 2 | } | 75 | 0 | return nullptr; | 76 | 4 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE7EE10execute_ifERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISC_EESH_ Line | Count | Source | 55 | 4 | const ColumnPtr& else_col) { | 56 | 4 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 57 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 58 | 1 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 59 | 1 | } else if (const auto* col_const_else = | 60 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 61 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 62 | 1 | get_data_from_column_const(col_const_else)); | 63 | 1 | } | 64 | 2 | } else if (const auto* col_const_then = | 65 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 66 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 67 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 68 | 1 | col_else->get_data()); | 69 | 1 | } else if (const auto* col_const_else = | 70 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 71 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 72 | 1 | get_data_from_column_const(col_const_else)); | 73 | 1 | } | 74 | 2 | } | 75 | 0 | return nullptr; | 76 | 4 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE8EE10execute_ifERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISC_EESH_ Line | Count | Source | 55 | 4 | const ColumnPtr& else_col) { | 56 | 4 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 57 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 58 | 1 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 59 | 1 | } else if (const auto* col_const_else = | 60 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 61 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 62 | 1 | get_data_from_column_const(col_const_else)); | 63 | 1 | } | 64 | 2 | } else if (const auto* col_const_then = | 65 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 66 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 67 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 68 | 1 | col_else->get_data()); | 69 | 1 | } else if (const auto* col_const_else = | 70 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 71 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 72 | 1 | get_data_from_column_const(col_const_else)); | 73 | 1 | } | 74 | 2 | } | 75 | 0 | return nullptr; | 76 | 4 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE9EE10execute_ifERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISC_EESH_ Line | Count | Source | 55 | 5 | const ColumnPtr& else_col) { | 56 | 5 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 57 | 3 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 58 | 2 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 59 | 2 | } else if (const auto* col_const_else = | 60 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 61 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 62 | 1 | get_data_from_column_const(col_const_else)); | 63 | 1 | } | 64 | 3 | } else if (const auto* col_const_then = | 65 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 66 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 67 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 68 | 1 | col_else->get_data()); | 69 | 1 | } else if (const auto* col_const_else = | 70 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 71 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 72 | 1 | get_data_from_column_const(col_const_else)); | 73 | 1 | } | 74 | 2 | } | 75 | 0 | return nullptr; | 76 | 5 | } |
|
77 | | |
78 | | private: |
79 | | template <bool is_const_a, bool is_const_b> |
80 | 33 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { |
81 | | #ifdef __ARM_NEON |
82 | | if constexpr (can_use_neon_opt()) { |
83 | | auto col_res = ColVecResult::create(cond.size()); |
84 | | auto res = col_res->get_data().data(); |
85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); |
86 | | return col_res; |
87 | | } |
88 | | #endif |
89 | 33 | return native_execute<is_const_a, is_const_b>(cond, a, b); |
90 | 33 | } _ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE5EE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IiLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 5 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 5 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 5 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE5EE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IiLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE5EE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IiLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE5EE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IiLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE3EE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IaLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE3EE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IaLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE3EE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IaLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE3EE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IaLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE4EE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IsLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE4EE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IsLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE4EE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IsLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE4EE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IsLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE6EE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IlLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE6EE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IlLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE6EE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IlLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE6EE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IlLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE7EE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_InLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE7EE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_InLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE7EE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_InLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE7EE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_InLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE8EE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IfLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE8EE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IfLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE8EE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IfLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE8EE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IfLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE9EE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IdLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 2 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 2 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 2 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE9EE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IdLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE9EE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IdLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE9EE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IdLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 80 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 81 | | #ifdef __ARM_NEON | 82 | | if constexpr (can_use_neon_opt()) { | 83 | | auto col_res = ColVecResult::create(cond.size()); | 84 | | auto res = col_res->get_data().data(); | 85 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 86 | | return col_res; | 87 | | } | 88 | | #endif | 89 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 90 | 1 | } |
|
91 | | |
92 | | // res[i] = cond[i] ? a[i] : b[i]; |
93 | | template <bool is_const_a, bool is_const_b> |
94 | 33 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { |
95 | 33 | size_t size = cond.size(); |
96 | 33 | auto col_res = ColVecResult::create(size); |
97 | 33 | typename ColVecResult::Container& res = col_res->get_data(); |
98 | 30.5k | for (size_t i = 0; i < size; ++i) { |
99 | 30.4k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] |
100 | 30.4k | : b[index_check_const<is_const_b>(i)]; |
101 | 30.4k | } |
102 | 33 | return col_res; |
103 | 33 | } _ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE5EE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IiLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 5 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 5 | size_t size = cond.size(); | 96 | 5 | auto col_res = ColVecResult::create(size); | 97 | 5 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 2.09k | for (size_t i = 0; i < size; ++i) { | 99 | 2.09k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 2.09k | : b[index_check_const<is_const_b>(i)]; | 101 | 2.09k | } | 102 | 5 | return col_res; | 103 | 5 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE5EE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IiLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE5EE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IiLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE5EE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IiLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE3EE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IaLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE3EE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IaLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE3EE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IaLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE3EE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IaLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE4EE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IsLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE4EE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IsLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE4EE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IsLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE4EE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IsLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE6EE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IlLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE6EE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IlLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE6EE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IlLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE6EE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IlLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE7EE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_InLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE7EE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_InLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE7EE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_InLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE7EE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_InLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE8EE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IfLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE8EE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IfLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE8EE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IfLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE8EE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IfLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE9EE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IdLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 2 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 2 | size_t size = cond.size(); | 96 | 2 | auto col_res = ColVecResult::create(size); | 97 | 2 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 2 | return col_res; | 103 | 2 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE9EE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IdLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE9EE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IdLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
_ZN5doris10vectorized9NumIfImplILNS_13PrimitiveTypeE9EE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS6_EERKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEERKNSA_IdLm4096ESD_Lm16ELm15EEESJ_ Line | Count | Source | 94 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 95 | 1 | size_t size = cond.size(); | 96 | 1 | auto col_res = ColVecResult::create(size); | 97 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 98 | 1.05k | for (size_t i = 0; i < size; ++i) { | 99 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 100 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 101 | 1.05k | } | 102 | 1 | return col_res; | 103 | 1 | } |
|
104 | | |
105 | | #ifdef __ARM_NEON |
106 | | constexpr static bool can_use_neon_opt() { |
107 | | return sizeof(Type) == 1 || sizeof(Type) == 2 || sizeof(Type) == 4 || sizeof(Type) == 8; |
108 | | } |
109 | | |
110 | | template <bool is_a_const, bool is_b_const> |
111 | | static void neon_execute(const uint8_t* cond, Type* res, const Type* a, const Type* b, |
112 | | size_t size) { |
113 | | const Type* res_end = res + size; |
114 | | constexpr int data_size = sizeof(Type); |
115 | | constexpr int elements_per_process = 16; |
116 | | |
117 | | // Process 16 element of data at a time |
118 | | while (res + elements_per_process < res_end) { |
119 | | // Load 16 cond masks |
120 | | uint8x16_t loaded_mask = vld1q_u8(cond); |
121 | | //[1, 0, 1, 0, 1, 0, 1, 0, ...] |
122 | | |
123 | | loaded_mask = vceqq_u8(loaded_mask, vdupq_n_u8(0)); |
124 | | //[0, FF, 0, FF, 0, FF, 0, FF, ...] |
125 | | |
126 | | loaded_mask = vmvnq_u8(loaded_mask); |
127 | | //[FF, 0, FF, 0, FF, 0, FF, 0, ...] |
128 | | |
129 | | if constexpr (data_size == 1) { |
130 | | uint8x16_t vec_a; |
131 | | if constexpr (!is_a_const) { |
132 | | vec_a = vld1q_u8(reinterpret_cast<const uint8_t*>(a)); |
133 | | } else { |
134 | | vec_a = vdupq_n_u8(*reinterpret_cast<const uint8_t*>(a)); |
135 | | } |
136 | | |
137 | | uint8x16_t vec_b; |
138 | | if constexpr (!is_b_const) { |
139 | | vec_b = vld1q_u8(reinterpret_cast<const uint8_t*>(b)); |
140 | | } else { |
141 | | vec_b = vdupq_n_u8(*reinterpret_cast<const uint8_t*>(b)); |
142 | | } |
143 | | |
144 | | uint8x16_t result = vbslq_u8(loaded_mask, vec_a, vec_b); |
145 | | |
146 | | vst1q_u8(reinterpret_cast<uint8_t*>(res), result); |
147 | | |
148 | | } else if constexpr (data_size == 2) { |
149 | | // Process 2 groups, each handling 8 int16 |
150 | | for (int i = 0; i < 2; i++) { |
151 | | uint16x8_t vec_a; |
152 | | if constexpr (!is_a_const) { |
153 | | vec_a = vld1q_u16(reinterpret_cast<const uint16_t*>(a) + i * 8); |
154 | | } else { |
155 | | vec_a = vdupq_n_u16(*reinterpret_cast<const uint16_t*>(a)); |
156 | | } |
157 | | |
158 | | uint16x8_t vec_b; |
159 | | if constexpr (!is_b_const) { |
160 | | vec_b = vld1q_u16(reinterpret_cast<const uint16_t*>(b) + i * 8); |
161 | | } else { |
162 | | vec_b = vdupq_n_u16(*reinterpret_cast<const uint16_t*>(b)); |
163 | | } |
164 | | |
165 | | uint8x16_t index = {0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}; |
166 | | uint8x16_t mask = vqtbl1q_u8(loaded_mask, index); |
167 | | // loaded_mask = [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] : u8 |
168 | | // index = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7] : u8 |
169 | | // mask = [A, A, B, B, C, C, D, D, E, E, F, F, G, G, H, H] : u8 |
170 | | |
171 | | uint16x8_t result = vbslq_u16(vreinterpretq_u16_u8(mask), vec_a, vec_b); |
172 | | |
173 | | vst1q_u16(reinterpret_cast<uint16_t*>(res) + i * 8, result); |
174 | | loaded_mask = vextq_u8(loaded_mask, loaded_mask, 8); |
175 | | } |
176 | | } else if constexpr (data_size == 4) { |
177 | | // Process 4 groups, each handling 4 int32 |
178 | | for (int i = 0; i < 4; i++) { |
179 | | uint32x4_t vec_a; |
180 | | if constexpr (!is_a_const) { |
181 | | vec_a = vld1q_u32(reinterpret_cast<const uint32_t*>(a) + i * 4); |
182 | | } else { |
183 | | vec_a = vdupq_n_u32(*reinterpret_cast<const uint32_t*>(a)); |
184 | | } |
185 | | |
186 | | uint32x4_t vec_b; |
187 | | if constexpr (!is_b_const) { |
188 | | vec_b = vld1q_u32(reinterpret_cast<const uint32_t*>(b) + i * 4); |
189 | | } else { |
190 | | vec_b = vdupq_n_u32(*reinterpret_cast<const uint32_t*>(b)); |
191 | | } |
192 | | |
193 | | uint8x16_t index = {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3}; |
194 | | uint8x16_t mask = vqtbl1q_u8(loaded_mask, index); |
195 | | |
196 | | uint32x4_t result = vbslq_u32(vreinterpretq_u32_u8(mask), vec_a, vec_b); |
197 | | |
198 | | vst1q_u32(reinterpret_cast<uint32_t*>(res) + i * 4, result); |
199 | | loaded_mask = vextq_u8(loaded_mask, loaded_mask, 4); |
200 | | } |
201 | | } else if constexpr (data_size == 8) { |
202 | | // Process 8 groups, each handling 2 int64 |
203 | | for (int i = 0; i < 8; i++) { |
204 | | uint64x2_t vec_a; |
205 | | if constexpr (!is_a_const) { |
206 | | vec_a = vld1q_u64(reinterpret_cast<const uint64_t*>(a) + i * 2); |
207 | | } else { |
208 | | vec_a = vdupq_n_u64(*reinterpret_cast<const uint64_t*>(a)); |
209 | | } |
210 | | |
211 | | uint64x2_t vec_b; |
212 | | if constexpr (!is_b_const) { |
213 | | vec_b = vld1q_u64(reinterpret_cast<const uint64_t*>(b) + i * 2); |
214 | | } else { |
215 | | vec_b = vdupq_n_u64(*reinterpret_cast<const uint64_t*>(b)); |
216 | | } |
217 | | |
218 | | uint8x16_t index = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}; |
219 | | uint8x16_t mask = vqtbl1q_u8(loaded_mask, index); |
220 | | |
221 | | uint64x2_t result = vbslq_u64(vreinterpretq_u64_u8(mask), vec_a, vec_b); |
222 | | |
223 | | vst1q_u64(reinterpret_cast<uint64_t*>(res) + i * 2, result); |
224 | | |
225 | | loaded_mask = vextq_u8(loaded_mask, loaded_mask, 2); |
226 | | } |
227 | | } |
228 | | |
229 | | res += elements_per_process; |
230 | | cond += elements_per_process; |
231 | | if (!is_a_const) { |
232 | | a += elements_per_process; |
233 | | } |
234 | | if (!is_b_const) { |
235 | | b += elements_per_process; |
236 | | } |
237 | | } |
238 | | |
239 | | // for the remaining data |
240 | | while (res < res_end) { |
241 | | *res = *cond ? *a : *b; |
242 | | res++; |
243 | | cond++; |
244 | | if (!is_a_const) { |
245 | | a++; |
246 | | } |
247 | | if (!is_b_const) { |
248 | | b++; |
249 | | } |
250 | | } |
251 | | } |
252 | | |
253 | | #endif |
254 | | }; |
255 | | |
256 | | } // namespace doris::vectorized |