/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 <typename Type> |
41 | | struct NumIfImpl { |
42 | | private: |
43 | | using ArrayCond = PaddedPODArray<UInt8>; |
44 | | using Array = PaddedPODArray<Type>; |
45 | | using ColVecResult = ColumnVector<Type>; |
46 | | using ColVecT = ColumnVector<Type>; |
47 | | |
48 | | public: |
49 | 28 | static const Array& get_data_from_column_const(const ColumnConst* column) { |
50 | 28 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); |
51 | 28 | } _ZN5doris10vectorized9NumIfImplIiE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 49 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 50 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 51 | 4 | } |
_ZN5doris10vectorized9NumIfImplIaE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 49 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 50 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 51 | 4 | } |
_ZN5doris10vectorized9NumIfImplIsE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 49 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 50 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 51 | 4 | } |
_ZN5doris10vectorized9NumIfImplIlE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 49 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 50 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 51 | 4 | } |
_ZN5doris10vectorized9NumIfImplInE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 49 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 50 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 51 | 4 | } |
_ZN5doris10vectorized9NumIfImplIfE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 49 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 50 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 51 | 4 | } |
_ZN5doris10vectorized9NumIfImplIdE26get_data_from_column_constEPKNS0_11ColumnConstE Line | Count | Source | 49 | 4 | static const Array& get_data_from_column_const(const ColumnConst* column) { | 50 | 4 | return assert_cast<const ColVecT&>(column->get_data_column()).get_data(); | 51 | 4 | } |
|
52 | | |
53 | | static ColumnPtr execute_if(const ArrayCond& cond, const ColumnPtr& then_col, |
54 | 33 | const ColumnPtr& else_col) { |
55 | 33 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { |
56 | 19 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { |
57 | 12 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); |
58 | 12 | } else if (const auto* col_const_else = |
59 | 7 | check_and_get_column_const<ColVecT>(else_col.get())) { |
60 | 7 | return execute_impl<false, true>(cond, col_then->get_data(), |
61 | 7 | get_data_from_column_const(col_const_else)); |
62 | 7 | } |
63 | 19 | } else if (const auto* col_const_then = |
64 | 14 | check_and_get_column_const<ColVecT>(then_col.get())) { |
65 | 14 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { |
66 | 7 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), |
67 | 7 | col_else->get_data()); |
68 | 7 | } else if (const auto* col_const_else = |
69 | 7 | check_and_get_column_const<ColVecT>(else_col.get())) { |
70 | 7 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), |
71 | 7 | get_data_from_column_const(col_const_else)); |
72 | 7 | } |
73 | 14 | } |
74 | 0 | return nullptr; |
75 | 33 | } _ZN5doris10vectorized9NumIfImplIiE10execute_ifERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISB_EESG_ Line | Count | Source | 54 | 8 | const ColumnPtr& else_col) { | 55 | 8 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 56 | 6 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 57 | 5 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 58 | 5 | } else if (const auto* col_const_else = | 59 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 60 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 61 | 1 | get_data_from_column_const(col_const_else)); | 62 | 1 | } | 63 | 6 | } else if (const auto* col_const_then = | 64 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 65 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 66 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 67 | 1 | col_else->get_data()); | 68 | 1 | } else if (const auto* col_const_else = | 69 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 70 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 71 | 1 | get_data_from_column_const(col_const_else)); | 72 | 1 | } | 73 | 2 | } | 74 | 0 | return nullptr; | 75 | 8 | } |
_ZN5doris10vectorized9NumIfImplIaE10execute_ifERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISB_EESG_ Line | Count | Source | 54 | 4 | const ColumnPtr& else_col) { | 55 | 4 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 56 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 57 | 1 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 58 | 1 | } else if (const auto* col_const_else = | 59 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 60 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 61 | 1 | get_data_from_column_const(col_const_else)); | 62 | 1 | } | 63 | 2 | } else if (const auto* col_const_then = | 64 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 65 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 66 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 67 | 1 | col_else->get_data()); | 68 | 1 | } else if (const auto* col_const_else = | 69 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 70 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 71 | 1 | get_data_from_column_const(col_const_else)); | 72 | 1 | } | 73 | 2 | } | 74 | 0 | return nullptr; | 75 | 4 | } |
_ZN5doris10vectorized9NumIfImplIsE10execute_ifERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISB_EESG_ Line | Count | Source | 54 | 4 | const ColumnPtr& else_col) { | 55 | 4 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 56 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 57 | 1 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 58 | 1 | } else if (const auto* col_const_else = | 59 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 60 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 61 | 1 | get_data_from_column_const(col_const_else)); | 62 | 1 | } | 63 | 2 | } else if (const auto* col_const_then = | 64 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 65 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 66 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 67 | 1 | col_else->get_data()); | 68 | 1 | } else if (const auto* col_const_else = | 69 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 70 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 71 | 1 | get_data_from_column_const(col_const_else)); | 72 | 1 | } | 73 | 2 | } | 74 | 0 | return nullptr; | 75 | 4 | } |
_ZN5doris10vectorized9NumIfImplIlE10execute_ifERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISB_EESG_ Line | Count | Source | 54 | 4 | const ColumnPtr& else_col) { | 55 | 4 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 56 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 57 | 1 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 58 | 1 | } else if (const auto* col_const_else = | 59 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 60 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 61 | 1 | get_data_from_column_const(col_const_else)); | 62 | 1 | } | 63 | 2 | } else if (const auto* col_const_then = | 64 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 65 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 66 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 67 | 1 | col_else->get_data()); | 68 | 1 | } else if (const auto* col_const_else = | 69 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 70 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 71 | 1 | get_data_from_column_const(col_const_else)); | 72 | 1 | } | 73 | 2 | } | 74 | 0 | return nullptr; | 75 | 4 | } |
_ZN5doris10vectorized9NumIfImplInE10execute_ifERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISB_EESG_ Line | Count | Source | 54 | 4 | const ColumnPtr& else_col) { | 55 | 4 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 56 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 57 | 1 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 58 | 1 | } else if (const auto* col_const_else = | 59 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 60 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 61 | 1 | get_data_from_column_const(col_const_else)); | 62 | 1 | } | 63 | 2 | } else if (const auto* col_const_then = | 64 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 65 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 66 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 67 | 1 | col_else->get_data()); | 68 | 1 | } else if (const auto* col_const_else = | 69 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 70 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 71 | 1 | get_data_from_column_const(col_const_else)); | 72 | 1 | } | 73 | 2 | } | 74 | 0 | return nullptr; | 75 | 4 | } |
_ZN5doris10vectorized9NumIfImplIfE10execute_ifERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISB_EESG_ Line | Count | Source | 54 | 4 | const ColumnPtr& else_col) { | 55 | 4 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 56 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 57 | 1 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 58 | 1 | } else if (const auto* col_const_else = | 59 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 60 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 61 | 1 | get_data_from_column_const(col_const_else)); | 62 | 1 | } | 63 | 2 | } else if (const auto* col_const_then = | 64 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 65 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 66 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 67 | 1 | col_else->get_data()); | 68 | 1 | } else if (const auto* col_const_else = | 69 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 70 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 71 | 1 | get_data_from_column_const(col_const_else)); | 72 | 1 | } | 73 | 2 | } | 74 | 0 | return nullptr; | 75 | 4 | } |
_ZN5doris10vectorized9NumIfImplIdE10execute_ifERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS_3COWINS0_7IColumnEE13immutable_ptrISB_EESG_ Line | Count | Source | 54 | 5 | const ColumnPtr& else_col) { | 55 | 5 | if (const auto* col_then = check_and_get_column<ColVecT>(then_col.get())) { | 56 | 3 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 57 | 2 | return execute_impl<false, false>(cond, col_then->get_data(), col_else->get_data()); | 58 | 2 | } else if (const auto* col_const_else = | 59 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 60 | 1 | return execute_impl<false, true>(cond, col_then->get_data(), | 61 | 1 | get_data_from_column_const(col_const_else)); | 62 | 1 | } | 63 | 3 | } else if (const auto* col_const_then = | 64 | 2 | check_and_get_column_const<ColVecT>(then_col.get())) { | 65 | 2 | if (const auto* col_else = check_and_get_column<ColVecT>(else_col.get())) { | 66 | 1 | return execute_impl<true, false>(cond, get_data_from_column_const(col_const_then), | 67 | 1 | col_else->get_data()); | 68 | 1 | } else if (const auto* col_const_else = | 69 | 1 | check_and_get_column_const<ColVecT>(else_col.get())) { | 70 | 1 | return execute_impl<true, true>(cond, get_data_from_column_const(col_const_then), | 71 | 1 | get_data_from_column_const(col_const_else)); | 72 | 1 | } | 73 | 2 | } | 74 | 0 | return nullptr; | 75 | 5 | } |
|
76 | | |
77 | | private: |
78 | | template <bool is_const_a, bool is_const_b> |
79 | 33 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { |
80 | | #ifdef __ARM_NEON |
81 | | if constexpr (can_use_neon_opt()) { |
82 | | auto col_res = ColVecResult::create(cond.size()); |
83 | | auto res = col_res->get_data().data(); |
84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); |
85 | | return col_res; |
86 | | } |
87 | | #endif |
88 | 33 | return native_execute<is_const_a, is_const_b>(cond, a, b); |
89 | 33 | } _ZN5doris10vectorized9NumIfImplIiE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IiLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 5 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 5 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 5 | } |
_ZN5doris10vectorized9NumIfImplIiE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IiLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIiE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IiLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIiE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IiLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIaE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IaLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIaE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IaLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIaE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IaLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIaE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IaLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIsE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IsLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIsE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IsLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIsE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IsLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIsE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IsLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIlE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IlLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIlE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IlLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIlE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IlLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIlE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IlLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplInE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_InLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplInE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_InLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplInE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_InLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplInE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_InLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIfE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IfLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIfE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IfLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIfE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IfLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIfE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IfLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIdE12execute_implILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IdLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 2 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 2 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 2 | } |
_ZN5doris10vectorized9NumIfImplIdE12execute_implILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IdLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIdE12execute_implILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IdLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
_ZN5doris10vectorized9NumIfImplIdE12execute_implILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IdLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 79 | 1 | static ColumnPtr execute_impl(const ArrayCond& cond, const Array& a, const Array& b) { | 80 | | #ifdef __ARM_NEON | 81 | | if constexpr (can_use_neon_opt()) { | 82 | | auto col_res = ColVecResult::create(cond.size()); | 83 | | auto res = col_res->get_data().data(); | 84 | | neon_execute<is_const_a, is_const_b>(cond.data(), res, a.data(), b.data(), cond.size()); | 85 | | return col_res; | 86 | | } | 87 | | #endif | 88 | 1 | return native_execute<is_const_a, is_const_b>(cond, a, b); | 89 | 1 | } |
|
90 | | |
91 | | // res[i] = cond[i] ? a[i] : b[i]; |
92 | | template <bool is_const_a, bool is_const_b> |
93 | 33 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { |
94 | 33 | size_t size = cond.size(); |
95 | 33 | auto col_res = ColVecResult::create(size); |
96 | 33 | typename ColVecResult::Container& res = col_res->get_data(); |
97 | 30.5k | for (size_t i = 0; i < size; ++i) { |
98 | 30.4k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] |
99 | 30.4k | : b[index_check_const<is_const_b>(i)]; |
100 | 30.4k | } |
101 | 33 | return col_res; |
102 | 33 | } _ZN5doris10vectorized9NumIfImplIiE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IiLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 5 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 5 | size_t size = cond.size(); | 95 | 5 | auto col_res = ColVecResult::create(size); | 96 | 5 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 2.09k | for (size_t i = 0; i < size; ++i) { | 98 | 2.09k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 2.09k | : b[index_check_const<is_const_b>(i)]; | 100 | 2.09k | } | 101 | 5 | return col_res; | 102 | 5 | } |
_ZN5doris10vectorized9NumIfImplIiE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IiLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIiE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IiLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIiE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IiLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIaE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IaLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIaE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IaLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIaE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IaLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIaE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IaLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIsE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IsLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIsE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IsLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIsE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IsLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIsE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IsLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIlE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IlLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIlE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IlLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIlE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IlLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIlE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IlLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplInE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_InLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplInE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_InLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplInE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_InLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplInE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_InLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIfE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IfLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIfE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IfLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIfE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IfLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIfE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IfLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIdE14native_executeILb0ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IdLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 2 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 2 | size_t size = cond.size(); | 95 | 2 | auto col_res = ColVecResult::create(size); | 96 | 2 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 2 | return col_res; | 102 | 2 | } |
_ZN5doris10vectorized9NumIfImplIdE14native_executeILb0ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IdLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIdE14native_executeILb1ELb0EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IdLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
_ZN5doris10vectorized9NumIfImplIdE14native_executeILb1ELb1EEENS_3COWINS0_7IColumnEE13immutable_ptrIS5_EERKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEERKNS9_IdLm4096ESC_Lm16ELm15EEESI_ Line | Count | Source | 93 | 1 | static ColumnPtr native_execute(const ArrayCond& cond, const Array& a, const Array& b) { | 94 | 1 | size_t size = cond.size(); | 95 | 1 | auto col_res = ColVecResult::create(size); | 96 | 1 | typename ColVecResult::Container& res = col_res->get_data(); | 97 | 1.05k | for (size_t i = 0; i < size; ++i) { | 98 | 1.05k | res[i] = cond[i] ? a[index_check_const<is_const_a>(i)] | 99 | 1.05k | : b[index_check_const<is_const_b>(i)]; | 100 | 1.05k | } | 101 | 1 | return col_res; | 102 | 1 | } |
|
103 | | |
104 | | #ifdef __ARM_NEON |
105 | | constexpr static bool can_use_neon_opt() { |
106 | | return sizeof(Type) == 1 || sizeof(Type) == 2 || sizeof(Type) == 4 || sizeof(Type) == 8; |
107 | | } |
108 | | |
109 | | template <bool is_a_const, bool is_b_const> |
110 | | static void neon_execute(const uint8_t* cond, Type* res, const Type* a, const Type* b, |
111 | | size_t size) { |
112 | | const Type* res_end = res + size; |
113 | | constexpr int data_size = sizeof(Type); |
114 | | constexpr int elements_per_process = 16; |
115 | | |
116 | | // Process 16 element of data at a time |
117 | | while (res + elements_per_process < res_end) { |
118 | | // Load 16 cond masks |
119 | | uint8x16_t loaded_mask = vld1q_u8(cond); |
120 | | //[1, 0, 1, 0, 1, 0, 1, 0, ...] |
121 | | |
122 | | loaded_mask = vceqq_u8(loaded_mask, vdupq_n_u8(0)); |
123 | | //[0, FF, 0, FF, 0, FF, 0, FF, ...] |
124 | | |
125 | | loaded_mask = vmvnq_u8(loaded_mask); |
126 | | //[FF, 0, FF, 0, FF, 0, FF, 0, ...] |
127 | | |
128 | | if constexpr (data_size == 1) { |
129 | | uint8x16_t vec_a; |
130 | | if constexpr (!is_a_const) { |
131 | | vec_a = vld1q_u8(reinterpret_cast<const uint8_t*>(a)); |
132 | | } else { |
133 | | vec_a = vdupq_n_u8(*reinterpret_cast<const uint8_t*>(a)); |
134 | | } |
135 | | |
136 | | uint8x16_t vec_b; |
137 | | if constexpr (!is_b_const) { |
138 | | vec_b = vld1q_u8(reinterpret_cast<const uint8_t*>(b)); |
139 | | } else { |
140 | | vec_b = vdupq_n_u8(*reinterpret_cast<const uint8_t*>(b)); |
141 | | } |
142 | | |
143 | | uint8x16_t result = vbslq_u8(loaded_mask, vec_a, vec_b); |
144 | | |
145 | | vst1q_u8(reinterpret_cast<uint8_t*>(res), result); |
146 | | |
147 | | } else if constexpr (data_size == 2) { |
148 | | // Process 2 groups, each handling 8 int16 |
149 | | for (int i = 0; i < 2; i++) { |
150 | | uint16x8_t vec_a; |
151 | | if constexpr (!is_a_const) { |
152 | | vec_a = vld1q_u16(reinterpret_cast<const uint16_t*>(a) + i * 8); |
153 | | } else { |
154 | | vec_a = vdupq_n_u16(*reinterpret_cast<const uint16_t*>(a)); |
155 | | } |
156 | | |
157 | | uint16x8_t vec_b; |
158 | | if constexpr (!is_b_const) { |
159 | | vec_b = vld1q_u16(reinterpret_cast<const uint16_t*>(b) + i * 8); |
160 | | } else { |
161 | | vec_b = vdupq_n_u16(*reinterpret_cast<const uint16_t*>(b)); |
162 | | } |
163 | | |
164 | | uint8x16_t index = {0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}; |
165 | | uint8x16_t mask = vqtbl1q_u8(loaded_mask, index); |
166 | | // loaded_mask = [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] : u8 |
167 | | // index = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7] : u8 |
168 | | // mask = [A, A, B, B, C, C, D, D, E, E, F, F, G, G, H, H] : u8 |
169 | | |
170 | | uint16x8_t result = vbslq_u16(vreinterpretq_u16_u8(mask), vec_a, vec_b); |
171 | | |
172 | | vst1q_u16(reinterpret_cast<uint16_t*>(res) + i * 8, result); |
173 | | loaded_mask = vextq_u8(loaded_mask, loaded_mask, 8); |
174 | | } |
175 | | } else if constexpr (data_size == 4) { |
176 | | // Process 4 groups, each handling 4 int32 |
177 | | for (int i = 0; i < 4; i++) { |
178 | | uint32x4_t vec_a; |
179 | | if constexpr (!is_a_const) { |
180 | | vec_a = vld1q_u32(reinterpret_cast<const uint32_t*>(a) + i * 4); |
181 | | } else { |
182 | | vec_a = vdupq_n_u32(*reinterpret_cast<const uint32_t*>(a)); |
183 | | } |
184 | | |
185 | | uint32x4_t vec_b; |
186 | | if constexpr (!is_b_const) { |
187 | | vec_b = vld1q_u32(reinterpret_cast<const uint32_t*>(b) + i * 4); |
188 | | } else { |
189 | | vec_b = vdupq_n_u32(*reinterpret_cast<const uint32_t*>(b)); |
190 | | } |
191 | | |
192 | | uint8x16_t index = {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3}; |
193 | | uint8x16_t mask = vqtbl1q_u8(loaded_mask, index); |
194 | | |
195 | | uint32x4_t result = vbslq_u32(vreinterpretq_u32_u8(mask), vec_a, vec_b); |
196 | | |
197 | | vst1q_u32(reinterpret_cast<uint32_t*>(res) + i * 4, result); |
198 | | loaded_mask = vextq_u8(loaded_mask, loaded_mask, 4); |
199 | | } |
200 | | } else if constexpr (data_size == 8) { |
201 | | // Process 8 groups, each handling 2 int64 |
202 | | for (int i = 0; i < 8; i++) { |
203 | | uint64x2_t vec_a; |
204 | | if constexpr (!is_a_const) { |
205 | | vec_a = vld1q_u64(reinterpret_cast<const uint64_t*>(a) + i * 2); |
206 | | } else { |
207 | | vec_a = vdupq_n_u64(*reinterpret_cast<const uint64_t*>(a)); |
208 | | } |
209 | | |
210 | | uint64x2_t vec_b; |
211 | | if constexpr (!is_b_const) { |
212 | | vec_b = vld1q_u64(reinterpret_cast<const uint64_t*>(b) + i * 2); |
213 | | } else { |
214 | | vec_b = vdupq_n_u64(*reinterpret_cast<const uint64_t*>(b)); |
215 | | } |
216 | | |
217 | | uint8x16_t index = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}; |
218 | | uint8x16_t mask = vqtbl1q_u8(loaded_mask, index); |
219 | | |
220 | | uint64x2_t result = vbslq_u64(vreinterpretq_u64_u8(mask), vec_a, vec_b); |
221 | | |
222 | | vst1q_u64(reinterpret_cast<uint64_t*>(res) + i * 2, result); |
223 | | |
224 | | loaded_mask = vextq_u8(loaded_mask, loaded_mask, 2); |
225 | | } |
226 | | } |
227 | | |
228 | | res += elements_per_process; |
229 | | cond += elements_per_process; |
230 | | if (!is_a_const) { |
231 | | a += elements_per_process; |
232 | | } |
233 | | if (!is_b_const) { |
234 | | b += elements_per_process; |
235 | | } |
236 | | } |
237 | | |
238 | | // for the remaining data |
239 | | while (res < res_end) { |
240 | | *res = *cond ? *a : *b; |
241 | | res++; |
242 | | cond++; |
243 | | if (!is_a_const) { |
244 | | a++; |
245 | | } |
246 | | if (!is_b_const) { |
247 | | b++; |
248 | | } |
249 | | } |
250 | | } |
251 | | |
252 | | #endif |
253 | | }; |
254 | | |
255 | | } // namespace doris::vectorized |