/root/doris/be/src/vec/functions/math.cpp
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 | | |
18 | | #include <cstdint> |
19 | | #include <cstring> |
20 | | |
21 | | // IWYU pragma: no_include <bits/std_abs.h> |
22 | | #include <dlfcn.h> |
23 | | |
24 | | #include <cmath> |
25 | | #include <string> |
26 | | #include <type_traits> |
27 | | |
28 | | #include "common/status.h" |
29 | | #include "vec/columns/column.h" |
30 | | #include "vec/columns/column_string.h" |
31 | | #include "vec/columns/column_vector.h" |
32 | | #include "vec/columns/columns_number.h" |
33 | | #include "vec/core/types.h" |
34 | | #include "vec/data_types/data_type_string.h" |
35 | | #include "vec/data_types/number_traits.h" |
36 | | #include "vec/functions/function_binary_arithmetic.h" |
37 | | #include "vec/functions/function_const.h" |
38 | | #include "vec/functions/function_math_log.h" |
39 | | #include "vec/functions/function_math_unary.h" |
40 | | #include "vec/functions/function_math_unary_alway_nullable.h" |
41 | | #include "vec/functions/function_string.h" |
42 | | #include "vec/functions/function_totype.h" |
43 | | #include "vec/functions/function_unary_arithmetic.h" |
44 | | #include "vec/functions/simple_function_factory.h" |
45 | | |
46 | | namespace doris { |
47 | | namespace vectorized { |
48 | | struct LnImpl; |
49 | | struct Log10Impl; |
50 | | struct Log2Impl; |
51 | | } // namespace vectorized |
52 | | } // namespace doris |
53 | | |
54 | | namespace doris::vectorized { |
55 | | struct AcosName { |
56 | | static constexpr auto name = "acos"; |
57 | | // https://dev.mysql.com/doc/refman/8.4/en/mathematical-functions.html#function_acos |
58 | 4 | static constexpr bool is_invalid_input(Float64 x) { return x < -1 || x > 1; } Branch (58:64): [True: 0, False: 4]
Branch (58:74): [True: 0, False: 4]
|
59 | | }; |
60 | | using FunctionAcos = |
61 | | FunctionMathUnaryAlwayNullable<UnaryFunctionPlainAlwayNullable<AcosName, std::acos>>; |
62 | | |
63 | | struct AsinName { |
64 | | static constexpr auto name = "asin"; |
65 | | // https://dev.mysql.com/doc/refman/8.4/en/mathematical-functions.html#function_asin |
66 | 4 | static constexpr bool is_invalid_input(Float64 x) { return x < -1 || x > 1; } Branch (66:64): [True: 0, False: 4]
Branch (66:74): [True: 0, False: 4]
|
67 | | }; |
68 | | using FunctionAsin = |
69 | | FunctionMathUnaryAlwayNullable<UnaryFunctionPlainAlwayNullable<AsinName, std::asin>>; |
70 | | |
71 | | struct AtanName { |
72 | | static constexpr auto name = "atan"; |
73 | | }; |
74 | | using FunctionAtan = FunctionMathUnary<UnaryFunctionPlain<AtanName, std::atan>>; |
75 | | |
76 | | template <typename A, typename B> |
77 | | struct Atan2Impl { |
78 | | using ResultType = double; |
79 | | static const constexpr bool allow_decimal = false; |
80 | | |
81 | | template <typename type> |
82 | 21 | static inline double apply(A a, B b) { |
83 | 21 | return std::atan2((double)a, (double)b); |
84 | 21 | } Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIhhE5applyIdEEdhh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIhaE5applyIdEEdha Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIhsE5applyIdEEdhs Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIhiE5applyIdEEdhi Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIhlE5applyIdEEdhl Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIhnE5applyIdEEdhn Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIhfE5applyIdEEdhf Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIhdE5applyIdEEdhd Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIahE5applyIdEEdah Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIaaE5applyIdEEdaa Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIasE5applyIdEEdas Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIaiE5applyIdEEdai Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIalE5applyIdEEdal Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIanE5applyIdEEdan Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIafE5applyIdEEdaf Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIadE5applyIdEEdad Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIshE5applyIdEEdsh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIsaE5applyIdEEdsa Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIssE5applyIdEEdss Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIsiE5applyIdEEdsi Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIslE5applyIdEEdsl Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIsnE5applyIdEEdsn Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIsfE5applyIdEEdsf Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIsdE5applyIdEEdsd Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIihE5applyIdEEdih Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIiaE5applyIdEEdia Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIisE5applyIdEEdis Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIiiE5applyIdEEdii Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIilE5applyIdEEdil Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIinE5applyIdEEdin Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIifE5applyIdEEdif Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIidE5applyIdEEdid Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIlhE5applyIdEEdlh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIlaE5applyIdEEdla Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIlsE5applyIdEEdls Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIliE5applyIdEEdli Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIllE5applyIdEEdll Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIlnE5applyIdEEdln Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIlfE5applyIdEEdlf Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIldE5applyIdEEdld Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplInhE5applyIdEEdnh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplInaE5applyIdEEdna Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplInsE5applyIdEEdns Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIniE5applyIdEEdni Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplInlE5applyIdEEdnl Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplInnE5applyIdEEdnn Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplInfE5applyIdEEdnf Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIndE5applyIdEEdnd Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIfhE5applyIdEEdfh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIfaE5applyIdEEdfa Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIfsE5applyIdEEdfs Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIfiE5applyIdEEdfi Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIflE5applyIdEEdfl Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIfnE5applyIdEEdfn Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIffE5applyIdEEdff Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIfdE5applyIdEEdfd Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIdhE5applyIdEEddh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIdaE5applyIdEEdda Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIdsE5applyIdEEdds Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIdiE5applyIdEEddi Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIdlE5applyIdEEddl Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIdnE5applyIdEEddn Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplIdfE5applyIdEEddf _ZN5doris10vectorized9Atan2ImplIddE5applyIdEEddd Line | Count | Source | 82 | 21 | static inline double apply(A a, B b) { | 83 | 21 | return std::atan2((double)a, (double)b); | 84 | 21 | } |
|
85 | | }; |
86 | | struct Atan2Name { |
87 | | static constexpr auto name = "atan2"; |
88 | | }; |
89 | | using FunctionAtan2 = FunctionBinaryArithmetic<Atan2Impl, Atan2Name, false>; |
90 | | |
91 | | struct CosName { |
92 | | static constexpr auto name = "cos"; |
93 | | }; |
94 | | using FunctionCos = FunctionMathUnary<UnaryFunctionPlain<CosName, std::cos>>; |
95 | | |
96 | | struct CoshName { |
97 | | static constexpr auto name = "cosh"; |
98 | | }; |
99 | | using FunctionCosh = FunctionMathUnary<UnaryFunctionPlain<CoshName, std::cosh>>; |
100 | | |
101 | | struct EImpl { |
102 | | static constexpr auto name = "e"; |
103 | | static constexpr double value = 2.7182818284590452353602874713526624977572470; |
104 | | }; |
105 | | using FunctionE = FunctionMathConstFloat64<EImpl>; |
106 | | |
107 | | struct PiImpl { |
108 | | static constexpr auto name = "pi"; |
109 | | static constexpr double value = 3.1415926535897932384626433832795028841971693; |
110 | | }; |
111 | | using FunctionPi = FunctionMathConstFloat64<PiImpl>; |
112 | | |
113 | | struct ExpName { |
114 | | static constexpr auto name = "exp"; |
115 | | }; |
116 | | using FunctionExp = FunctionMathUnary<UnaryFunctionPlain<ExpName, std::exp>>; |
117 | | |
118 | | struct LogName { |
119 | | static constexpr auto name = "log"; |
120 | | }; |
121 | | |
122 | | template <typename A, typename B> |
123 | | struct LogImpl { |
124 | | using ResultType = Float64; |
125 | | using Traits = NumberTraits::BinaryOperatorTraits<A, B>; |
126 | | |
127 | | static const constexpr bool allow_decimal = false; |
128 | | static constexpr double EPSILON = 1e-9; |
129 | | |
130 | | template <typename Result = ResultType> |
131 | | static void apply(const typename Traits::ArrayA& a, B b, |
132 | | typename ColumnVector<Result>::Container& c, |
133 | 0 | typename Traits::ArrayNull& null_map) { |
134 | 0 | size_t size = c.size(); |
135 | 0 | UInt8 is_null = b <= 0; |
136 | 0 | memset(null_map.data(), is_null, size); |
137 | |
|
138 | 0 | if (!is_null) { Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
Branch (138:13): [True: 0, False: 0]
|
139 | 0 | for (size_t i = 0; i < size; i++) { Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
Branch (139:32): [True: 0, False: 0]
|
140 | 0 | if (a[i] <= 0 || std::fabs(a[i] - 1.0) < EPSILON) { Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
Branch (140:21): [True: 0, False: 0]
Branch (140:34): [True: 0, False: 0]
|
141 | 0 | null_map[i] = 1; |
142 | 0 | } else { |
143 | 0 | c[i] = static_cast<Float64>(std::log(static_cast<Float64>(b)) / |
144 | 0 | std::log(static_cast<Float64>(a[i]))); |
145 | 0 | } |
146 | 0 | } |
147 | 0 | } |
148 | 0 | } Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhhE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhaE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhsE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhiE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhlE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhnE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhfE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhdE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplIahE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIaaE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIasE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIaiE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIalE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIanE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIafE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIadE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIshE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIsaE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIssE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIsiE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIslE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIsnE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIsfE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIsdE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIihE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIiaE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIisE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIiiE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIilE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIinE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIifE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIidE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIlhE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIlaE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIlsE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIliE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIllE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIlnE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIlfE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIldE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplInhE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplInaE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplInsE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIniE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplInlE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplInnE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplInfE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIndE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfhE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfaE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfsE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfiE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIflE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfnE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIffE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfdE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdhE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdaE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdsE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdiE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdlE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdnE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdfE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplIddE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE |
149 | | |
150 | | template <typename Result> |
151 | 6 | static inline Result apply(A a, B b, UInt8& is_null) { |
152 | 6 | is_null = a <= 0 || b <= 0 || std::fabs(a - 1.0) < EPSILON; Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 0, False: 0]
Branch (152:29): [True: 0, False: 0]
Branch (152:39): [True: 0, False: 0]
Branch (152:19): [True: 1, False: 5]
Branch (152:29): [True: 1, False: 4]
Branch (152:39): [True: 0, False: 4]
|
153 | 6 | return static_cast<Float64>(std::log(static_cast<Float64>(b)) / |
154 | 6 | std::log(static_cast<Float64>(a))); |
155 | 6 | } Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhhE5applyIdEET_hhRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhaE5applyIdEET_haRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhsE5applyIdEET_hsRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhiE5applyIdEET_hiRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhlE5applyIdEET_hlRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhnE5applyIdEET_hnRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhfE5applyIdEET_hfRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIhdE5applyIdEET_hdRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIahE5applyIdEET_ahRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIaaE5applyIdEET_aaRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIasE5applyIdEET_asRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIaiE5applyIdEET_aiRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIalE5applyIdEET_alRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIanE5applyIdEET_anRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIafE5applyIdEET_afRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIadE5applyIdEET_adRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIshE5applyIdEET_shRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIsaE5applyIdEET_saRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIssE5applyIdEET_ssRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIsiE5applyIdEET_siRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIslE5applyIdEET_slRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIsnE5applyIdEET_snRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIsfE5applyIdEET_sfRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIsdE5applyIdEET_sdRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIihE5applyIdEET_ihRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIiaE5applyIdEET_iaRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIisE5applyIdEET_isRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIiiE5applyIdEET_iiRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIilE5applyIdEET_ilRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIinE5applyIdEET_inRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIifE5applyIdEET_ifRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIidE5applyIdEET_idRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIlhE5applyIdEET_lhRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIlaE5applyIdEET_laRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIlsE5applyIdEET_lsRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIliE5applyIdEET_liRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIllE5applyIdEET_llRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIlnE5applyIdEET_lnRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIlfE5applyIdEET_lfRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIldE5applyIdEET_ldRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplInhE5applyIdEET_nhRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplInaE5applyIdEET_naRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplInsE5applyIdEET_nsRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIniE5applyIdEET_niRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplInlE5applyIdEET_nlRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplInnE5applyIdEET_nnRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplInfE5applyIdEET_nfRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIndE5applyIdEET_ndRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfhE5applyIdEET_fhRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfaE5applyIdEET_faRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfsE5applyIdEET_fsRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfiE5applyIdEET_fiRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIflE5applyIdEET_flRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfnE5applyIdEET_fnRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIffE5applyIdEET_ffRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIfdE5applyIdEET_fdRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdhE5applyIdEET_dhRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdaE5applyIdEET_daRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdsE5applyIdEET_dsRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdiE5applyIdEET_diRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdlE5applyIdEET_dlRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdnE5applyIdEET_dnRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplIdfE5applyIdEET_dfRh _ZN5doris10vectorized7LogImplIddE5applyIdEET_ddRh Line | Count | Source | 151 | 6 | static inline Result apply(A a, B b, UInt8& is_null) { | 152 | 6 | is_null = a <= 0 || b <= 0 || std::fabs(a - 1.0) < EPSILON; Branch (152:19): [True: 1, False: 5]
Branch (152:29): [True: 1, False: 4]
Branch (152:39): [True: 0, False: 4]
| 153 | 6 | return static_cast<Float64>(std::log(static_cast<Float64>(b)) / | 154 | 6 | std::log(static_cast<Float64>(a))); | 155 | 6 | } |
|
156 | | }; |
157 | | using FunctionLog = FunctionBinaryArithmetic<LogImpl, LogName, true>; |
158 | | |
159 | | template <typename A> |
160 | | struct SignImpl { |
161 | | using ResultType = Int8; |
162 | 6 | static inline ResultType apply(A a) { |
163 | 6 | if constexpr (IsDecimalNumber<A> || std::is_floating_point_v<A>) Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
|
164 | 3 | return static_cast<ResultType>(a < A(0) ? -1 : a == A(0) ? 0 : 1); Branch (164:44): [True: 0, False: 0]
Branch (164:60): [True: 0, False: 0]
Branch (164:44): [True: 1, False: 2]
Branch (164:60): [True: 1, False: 1]
|
165 | 3 | else if constexpr (std::is_signed_v<A>) Branch (165:28): [Folded - Ignored]
Branch (165:28): [Folded - Ignored]
Branch (165:28): [Folded - Ignored]
Branch (165:28): [Folded - Ignored]
Branch (165:28): [Folded - Ignored]
Branch (165:28): [Folded - Ignored]
Branch (165:28): [Folded - Ignored]
Branch (165:28): [Folded - Ignored]
Branch (165:28): [Folded - Ignored]
|
166 | 3 | return static_cast<ResultType>(a < 0 ? -1 : a == 0 ? 0 : 1); Branch (166:44): [True: 0, False: 0]
Branch (166:57): [True: 0, False: 0]
Branch (166:44): [True: 0, False: 0]
Branch (166:57): [True: 0, False: 0]
Branch (166:44): [True: 1, False: 2]
Branch (166:57): [True: 1, False: 1]
Branch (166:44): [True: 0, False: 0]
Branch (166:57): [True: 0, False: 0]
Branch (166:44): [True: 0, False: 0]
Branch (166:57): [True: 0, False: 0]
|
167 | 0 | else if constexpr (std::is_unsigned_v<A>) Branch (167:28): [Folded - Ignored]
Branch (167:28): [Folded - Ignored]
Branch (167:28): [Folded - Ignored]
Branch (167:28): [Folded - Ignored]
|
168 | 0 | return static_cast<ResultType>(a == 0 ? 0 : 1); Branch (168:44): [True: 0, False: 0]
Branch (168:44): [True: 0, False: 0]
Branch (168:44): [True: 0, False: 0]
Branch (168:44): [True: 0, False: 0]
|
169 | 6 | } Unexecuted instantiation: _ZN5doris10vectorized8SignImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized8SignImplItE5applyEt Unexecuted instantiation: _ZN5doris10vectorized8SignImplIjE5applyEj Unexecuted instantiation: _ZN5doris10vectorized8SignImplImE5applyEm Unexecuted instantiation: _ZN5doris10vectorized8SignImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized8SignImplIsE5applyEs _ZN5doris10vectorized8SignImplIiE5applyEi Line | Count | Source | 162 | 3 | static inline ResultType apply(A a) { | 163 | 3 | if constexpr (IsDecimalNumber<A> || std::is_floating_point_v<A>) Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
| 164 | 0 | return static_cast<ResultType>(a < A(0) ? -1 : a == A(0) ? 0 : 1); | 165 | 3 | else if constexpr (std::is_signed_v<A>) Branch (165:28): [Folded - Ignored]
| 166 | 3 | return static_cast<ResultType>(a < 0 ? -1 : a == 0 ? 0 : 1); Branch (166:44): [True: 1, False: 2]
Branch (166:57): [True: 1, False: 1]
| 167 | 3 | else if constexpr (std::is_unsigned_v<A>) | 168 | 3 | return static_cast<ResultType>(a == 0 ? 0 : 1); | 169 | 3 | } |
Unexecuted instantiation: _ZN5doris10vectorized8SignImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized8SignImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized8SignImplIfE5applyEf _ZN5doris10vectorized8SignImplIdE5applyEd Line | Count | Source | 162 | 3 | static inline ResultType apply(A a) { | 163 | 3 | if constexpr (IsDecimalNumber<A> || std::is_floating_point_v<A>) Branch (163:23): [Folded - Ignored]
Branch (163:23): [Folded - Ignored]
Branch (163:45): [Folded - Ignored]
| 164 | 3 | return static_cast<ResultType>(a < A(0) ? -1 : a == A(0) ? 0 : 1); Branch (164:44): [True: 1, False: 2]
Branch (164:60): [True: 1, False: 1]
| 165 | 3 | else if constexpr (std::is_signed_v<A>) | 166 | 3 | return static_cast<ResultType>(a < 0 ? -1 : a == 0 ? 0 : 1); | 167 | 3 | else if constexpr (std::is_unsigned_v<A>) | 168 | 3 | return static_cast<ResultType>(a == 0 ? 0 : 1); | 169 | 3 | } |
|
170 | | }; |
171 | | |
172 | | struct NameSign { |
173 | | static constexpr auto name = "sign"; |
174 | | }; |
175 | | using FunctionSign = FunctionUnaryArithmetic<SignImpl, NameSign>; |
176 | | |
177 | | template <typename A> |
178 | | struct AbsImpl { |
179 | | using ResultType = |
180 | | std::conditional_t<IsDecimalNumber<A>, A, typename NumberTraits::ResultOfAbs<A>::Type>; |
181 | | |
182 | 12 | static inline ResultType apply(A a) { |
183 | 12 | if constexpr (IsDecimalNumber<A>) Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
Branch (183:23): [Folded - Ignored]
|
184 | 0 | return a < A(0) ? A(-a) : a; Branch (184:20): [True: 0, False: 0]
Branch (184:20): [True: 0, False: 0]
Branch (184:20): [True: 0, False: 0]
Branch (184:20): [True: 0, False: 0]
Branch (184:20): [True: 0, False: 0]
|
185 | 12 | else if constexpr (std::is_integral_v<A> && std::is_signed_v<A>) Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
|
186 | 7 | return a < A(0) ? static_cast<ResultType>(~a) + 1 : a; Branch (186:20): [True: 0, False: 0]
Branch (186:20): [True: 0, False: 0]
Branch (186:20): [True: 3, False: 4]
Branch (186:20): [True: 0, False: 0]
Branch (186:20): [True: 0, False: 0]
|
187 | 5 | else if constexpr (std::is_integral_v<A> && std::is_unsigned_v<A>) Branch (187:28): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:53): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:53): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:53): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:53): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:53): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:53): [Folded - Ignored]
|
188 | 0 | return static_cast<ResultType>(a); |
189 | 5 | else if constexpr (std::is_floating_point_v<A>) Branch (189:28): [Folded - Ignored]
Branch (189:28): [Folded - Ignored]
|
190 | 5 | return static_cast<ResultType>(std::abs(a)); |
191 | 12 | } Unexecuted instantiation: _ZN5doris10vectorized7AbsImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized7AbsImplItE5applyEt Unexecuted instantiation: _ZN5doris10vectorized7AbsImplIjE5applyEj Unexecuted instantiation: _ZN5doris10vectorized7AbsImplImE5applyEm Unexecuted instantiation: _ZN5doris10vectorized7AbsImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized7AbsImplIsE5applyEs _ZN5doris10vectorized7AbsImplIiE5applyEi Line | Count | Source | 182 | 7 | static inline ResultType apply(A a) { | 183 | 7 | if constexpr (IsDecimalNumber<A>) Branch (183:23): [Folded - Ignored]
| 184 | 0 | return a < A(0) ? A(-a) : a; | 185 | 7 | else if constexpr (std::is_integral_v<A> && std::is_signed_v<A>) Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
| 186 | 7 | return a < A(0) ? static_cast<ResultType>(~a) + 1 : a; Branch (186:20): [True: 3, False: 4]
| 187 | 7 | else if constexpr (std::is_integral_v<A> && std::is_unsigned_v<A>) | 188 | 7 | return static_cast<ResultType>(a); | 189 | 7 | else if constexpr (std::is_floating_point_v<A>) | 190 | 7 | return static_cast<ResultType>(std::abs(a)); | 191 | 7 | } |
Unexecuted instantiation: _ZN5doris10vectorized7AbsImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized7AbsImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized7AbsImplIfE5applyEf _ZN5doris10vectorized7AbsImplIdE5applyEd Line | Count | Source | 182 | 5 | static inline ResultType apply(A a) { | 183 | 5 | if constexpr (IsDecimalNumber<A>) Branch (183:23): [Folded - Ignored]
| 184 | 0 | return a < A(0) ? A(-a) : a; | 185 | 5 | else if constexpr (std::is_integral_v<A> && std::is_signed_v<A>) Branch (185:28): [Folded - Ignored]
Branch (185:28): [Folded - Ignored]
Branch (185:53): [Folded - Ignored]
| 186 | 0 | return a < A(0) ? static_cast<ResultType>(~a) + 1 : a; | 187 | 5 | else if constexpr (std::is_integral_v<A> && std::is_unsigned_v<A>) Branch (187:28): [Folded - Ignored]
Branch (187:28): [Folded - Ignored]
Branch (187:53): [Folded - Ignored]
| 188 | 0 | return static_cast<ResultType>(a); | 189 | 5 | else if constexpr (std::is_floating_point_v<A>) Branch (189:28): [Folded - Ignored]
| 190 | 5 | return static_cast<ResultType>(std::abs(a)); | 191 | 5 | } |
Unexecuted instantiation: _ZN5doris10vectorized7AbsImplINS0_7DecimalIiEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized7AbsImplINS0_7DecimalIlEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized7AbsImplINS0_7DecimalInEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized7AbsImplINS0_12Decimal128V3EE5applyES2_ Unexecuted instantiation: _ZN5doris10vectorized7AbsImplINS0_7DecimalIN4wide7integerILm256EiEEEEE5applyES6_ |
192 | | }; |
193 | | |
194 | | struct NameAbs { |
195 | | static constexpr auto name = "abs"; |
196 | | }; |
197 | | |
198 | | using FunctionAbs = FunctionUnaryArithmetic<AbsImpl, NameAbs>; |
199 | | |
200 | | template <typename A> |
201 | | struct NegativeImpl { |
202 | | using ResultType = A; |
203 | | |
204 | 8 | static inline ResultType apply(A a) { return -a; } Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplItE5applyEt Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplIjE5applyEj Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplImE5applyEm Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplIsE5applyEs _ZN5doris10vectorized12NegativeImplIiE5applyEi Line | Count | Source | 204 | 4 | static inline ResultType apply(A a) { return -a; } |
Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplIfE5applyEf _ZN5doris10vectorized12NegativeImplIdE5applyEd Line | Count | Source | 204 | 4 | static inline ResultType apply(A a) { return -a; } |
Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplINS0_7DecimalIiEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplINS0_7DecimalIlEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplINS0_7DecimalInEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplINS0_12Decimal128V3EE5applyES2_ Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplINS0_7DecimalIN4wide7integerILm256EiEEEEE5applyES6_ |
205 | | }; |
206 | | |
207 | | struct NameNegative { |
208 | | static constexpr auto name = "negative"; |
209 | | }; |
210 | | |
211 | | using FunctionNegative = FunctionUnaryArithmetic<NegativeImpl, NameNegative>; |
212 | | |
213 | | template <typename A> |
214 | | struct PositiveImpl { |
215 | | using ResultType = A; |
216 | | |
217 | 8 | static inline ResultType apply(A a) { return static_cast<ResultType>(a); } Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplItE5applyEt Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplIjE5applyEj Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplImE5applyEm Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplIsE5applyEs _ZN5doris10vectorized12PositiveImplIiE5applyEi Line | Count | Source | 217 | 4 | static inline ResultType apply(A a) { return static_cast<ResultType>(a); } |
Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplIfE5applyEf _ZN5doris10vectorized12PositiveImplIdE5applyEd Line | Count | Source | 217 | 4 | static inline ResultType apply(A a) { return static_cast<ResultType>(a); } |
Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplINS0_7DecimalIiEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplINS0_7DecimalIlEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplINS0_7DecimalInEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplINS0_12Decimal128V3EE5applyES2_ Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplINS0_7DecimalIN4wide7integerILm256EiEEEEE5applyES6_ |
218 | | }; |
219 | | |
220 | | struct NamePositive { |
221 | | static constexpr auto name = "positive"; |
222 | | }; |
223 | | |
224 | | using FunctionPositive = FunctionUnaryArithmetic<PositiveImpl, NamePositive>; |
225 | | |
226 | | struct UnaryFunctionPlainSin { |
227 | | using Type = DataTypeFloat64; |
228 | | static constexpr auto name = "sin"; |
229 | | using FuncType = double (*)(double); |
230 | | |
231 | 1 | static FuncType get_sin_func() { |
232 | 1 | void* handle = dlopen("libm.so.6", RTLD_LAZY); |
233 | 1 | if (handle) { Branch (233:13): [True: 1, False: 0]
|
234 | 1 | if (auto sin_func = (double (*)(double))dlsym(handle, "sin"); sin_func) { Branch (234:75): [True: 1, False: 0]
|
235 | 1 | return sin_func; |
236 | 1 | } |
237 | 0 | dlclose(handle); |
238 | 0 | } |
239 | 0 | return std::sin; |
240 | 1 | } |
241 | | |
242 | 5 | static void execute(const double* src, double* dst) { |
243 | 5 | static auto sin_func = get_sin_func(); |
244 | 5 | *dst = sin_func(*src); |
245 | 5 | } |
246 | | }; |
247 | | |
248 | | using FunctionSin = FunctionMathUnary<UnaryFunctionPlainSin>; |
249 | | |
250 | | struct SqrtName { |
251 | | static constexpr auto name = "sqrt"; |
252 | | // https://dev.mysql.com/doc/refman/8.4/en/mathematical-functions.html#function_sqrt |
253 | 4 | static constexpr bool is_invalid_input(Float64 x) { return x < 0; } |
254 | | }; |
255 | | using FunctionSqrt = |
256 | | FunctionMathUnaryAlwayNullable<UnaryFunctionPlainAlwayNullable<SqrtName, std::sqrt>>; |
257 | | |
258 | | struct CbrtName { |
259 | | static constexpr auto name = "cbrt"; |
260 | | }; |
261 | | using FunctionCbrt = FunctionMathUnary<UnaryFunctionPlain<CbrtName, std::cbrt>>; |
262 | | |
263 | | struct TanName { |
264 | | static constexpr auto name = "tan"; |
265 | | }; |
266 | | using FunctionTan = FunctionMathUnary<UnaryFunctionPlain<TanName, std::tan>>; |
267 | | |
268 | | struct TanhName { |
269 | | static constexpr auto name = "tanh"; |
270 | | }; |
271 | | using FunctionTanh = FunctionMathUnary<UnaryFunctionPlain<TanhName, std::tanh>>; |
272 | | |
273 | | struct CotName { |
274 | | static constexpr auto name = "cot"; |
275 | | }; |
276 | 2 | double cot(double x) { |
277 | 2 | return 1.0 / std::tan(x); |
278 | 2 | } |
279 | | using FunctionCot = FunctionMathUnary<UnaryFunctionPlain<CotName, cot>>; |
280 | | |
281 | | struct SecName { |
282 | | static constexpr auto name = "sec"; |
283 | | }; |
284 | 2 | double sec(double x) { |
285 | 2 | return 1.0 / std::cos(x); |
286 | 2 | } |
287 | | using FunctionSec = FunctionMathUnary<UnaryFunctionPlain<SecName, sec>>; |
288 | | |
289 | | struct CosecName { |
290 | | static constexpr auto name = "cosec"; |
291 | | }; |
292 | 3 | double cosec(double x) { |
293 | 3 | return 1.0 / std::sin(x); |
294 | 3 | } |
295 | | using FunctionCosec = FunctionMathUnary<UnaryFunctionPlain<CosecName, cosec>>; |
296 | | |
297 | | template <typename A> |
298 | | struct RadiansImpl { |
299 | | using ResultType = A; |
300 | | |
301 | 4 | static inline ResultType apply(A a) { |
302 | 4 | return static_cast<ResultType>(a * PiImpl::value / 180.0); |
303 | 4 | } Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplItE5applyEt Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIjE5applyEj Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplImE5applyEm Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIsE5applyEs Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIiE5applyEi Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIfE5applyEf _ZN5doris10vectorized11RadiansImplIdE5applyEd Line | Count | Source | 301 | 4 | static inline ResultType apply(A a) { | 302 | 4 | return static_cast<ResultType>(a * PiImpl::value / 180.0); | 303 | 4 | } |
|
304 | | }; |
305 | | |
306 | | struct NameRadians { |
307 | | static constexpr auto name = "radians"; |
308 | | }; |
309 | | |
310 | | using FunctionRadians = FunctionUnaryArithmetic<RadiansImpl, NameRadians>; |
311 | | |
312 | | template <typename A> |
313 | | struct DegreesImpl { |
314 | | using ResultType = A; |
315 | | |
316 | 4 | static inline ResultType apply(A a) { |
317 | 4 | return static_cast<ResultType>(a * 180.0 / PiImpl::value); |
318 | 4 | } Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplItE5applyEt Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIjE5applyEj Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplImE5applyEm Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIsE5applyEs Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIiE5applyEi Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIfE5applyEf _ZN5doris10vectorized11DegreesImplIdE5applyEd Line | Count | Source | 316 | 4 | static inline ResultType apply(A a) { | 317 | 4 | return static_cast<ResultType>(a * 180.0 / PiImpl::value); | 318 | 4 | } |
|
319 | | }; |
320 | | |
321 | | struct NameDegrees { |
322 | | static constexpr auto name = "degrees"; |
323 | | }; |
324 | | |
325 | | using FunctionDegrees = FunctionUnaryArithmetic<DegreesImpl, NameDegrees>; |
326 | | |
327 | | struct NameBin { |
328 | | static constexpr auto name = "bin"; |
329 | | }; |
330 | | struct BinImpl { |
331 | | using ReturnType = DataTypeString; |
332 | | static constexpr auto TYPE_INDEX = TypeIndex::Int64; |
333 | | using Type = Int64; |
334 | | using ReturnColumnType = ColumnString; |
335 | | |
336 | 4 | static std::string bin_impl(Int64 value) { |
337 | 4 | uint64_t n = static_cast<uint64_t>(value); |
338 | 4 | const size_t max_bits = sizeof(uint64_t) * 8; |
339 | 4 | char result[max_bits]; |
340 | 4 | uint32_t index = max_bits; |
341 | 7 | do { |
342 | 7 | result[--index] = '0' + (n & 1); |
343 | 7 | } while (n >>= 1); Branch (343:18): [True: 3, False: 4]
|
344 | 4 | return std::string(result + index, max_bits - index); |
345 | 4 | } |
346 | | |
347 | | static Status vector(const ColumnInt64::Container& data, ColumnString::Chars& res_data, |
348 | 1 | ColumnString::Offsets& res_offsets) { |
349 | 1 | res_offsets.resize(data.size()); |
350 | 1 | size_t input_size = res_offsets.size(); |
351 | | |
352 | 5 | for (size_t i = 0; i < input_size; ++i) { Branch (352:28): [True: 4, False: 1]
|
353 | 4 | StringOP::push_value_string(bin_impl(data[i]), i, res_data, res_offsets); |
354 | 4 | } |
355 | 1 | return Status::OK(); |
356 | 1 | } |
357 | | }; |
358 | | |
359 | | using FunctionBin = FunctionUnaryToType<BinImpl, NameBin>; |
360 | | |
361 | | template <typename A, typename B> |
362 | | struct PowImpl { |
363 | | using ResultType = double; |
364 | | static const constexpr bool allow_decimal = false; |
365 | | |
366 | | template <typename type> |
367 | 4 | static inline double apply(A a, B b) { |
368 | | /// Next everywhere, static_cast - so that there is no wrong result in expressions of the form Int64 c = UInt32(a) * Int32(-1). |
369 | 4 | return std::pow((double)a, (double)b); |
370 | 4 | } Unexecuted instantiation: _ZN5doris10vectorized7PowImplIhhE5applyIdEEdhh Unexecuted instantiation: _ZN5doris10vectorized7PowImplIhaE5applyIdEEdha Unexecuted instantiation: _ZN5doris10vectorized7PowImplIhsE5applyIdEEdhs Unexecuted instantiation: _ZN5doris10vectorized7PowImplIhiE5applyIdEEdhi Unexecuted instantiation: _ZN5doris10vectorized7PowImplIhlE5applyIdEEdhl Unexecuted instantiation: _ZN5doris10vectorized7PowImplIhnE5applyIdEEdhn Unexecuted instantiation: _ZN5doris10vectorized7PowImplIhfE5applyIdEEdhf Unexecuted instantiation: _ZN5doris10vectorized7PowImplIhdE5applyIdEEdhd Unexecuted instantiation: _ZN5doris10vectorized7PowImplIahE5applyIdEEdah Unexecuted instantiation: _ZN5doris10vectorized7PowImplIaaE5applyIdEEdaa Unexecuted instantiation: _ZN5doris10vectorized7PowImplIasE5applyIdEEdas Unexecuted instantiation: _ZN5doris10vectorized7PowImplIaiE5applyIdEEdai Unexecuted instantiation: _ZN5doris10vectorized7PowImplIalE5applyIdEEdal Unexecuted instantiation: _ZN5doris10vectorized7PowImplIanE5applyIdEEdan Unexecuted instantiation: _ZN5doris10vectorized7PowImplIafE5applyIdEEdaf Unexecuted instantiation: _ZN5doris10vectorized7PowImplIadE5applyIdEEdad Unexecuted instantiation: _ZN5doris10vectorized7PowImplIshE5applyIdEEdsh Unexecuted instantiation: _ZN5doris10vectorized7PowImplIsaE5applyIdEEdsa Unexecuted instantiation: _ZN5doris10vectorized7PowImplIssE5applyIdEEdss Unexecuted instantiation: _ZN5doris10vectorized7PowImplIsiE5applyIdEEdsi Unexecuted instantiation: _ZN5doris10vectorized7PowImplIslE5applyIdEEdsl Unexecuted instantiation: _ZN5doris10vectorized7PowImplIsnE5applyIdEEdsn Unexecuted instantiation: _ZN5doris10vectorized7PowImplIsfE5applyIdEEdsf Unexecuted instantiation: _ZN5doris10vectorized7PowImplIsdE5applyIdEEdsd Unexecuted instantiation: _ZN5doris10vectorized7PowImplIihE5applyIdEEdih Unexecuted instantiation: _ZN5doris10vectorized7PowImplIiaE5applyIdEEdia Unexecuted instantiation: _ZN5doris10vectorized7PowImplIisE5applyIdEEdis Unexecuted instantiation: _ZN5doris10vectorized7PowImplIiiE5applyIdEEdii Unexecuted instantiation: _ZN5doris10vectorized7PowImplIilE5applyIdEEdil Unexecuted instantiation: _ZN5doris10vectorized7PowImplIinE5applyIdEEdin Unexecuted instantiation: _ZN5doris10vectorized7PowImplIifE5applyIdEEdif Unexecuted instantiation: _ZN5doris10vectorized7PowImplIidE5applyIdEEdid Unexecuted instantiation: _ZN5doris10vectorized7PowImplIlhE5applyIdEEdlh Unexecuted instantiation: _ZN5doris10vectorized7PowImplIlaE5applyIdEEdla Unexecuted instantiation: _ZN5doris10vectorized7PowImplIlsE5applyIdEEdls Unexecuted instantiation: _ZN5doris10vectorized7PowImplIliE5applyIdEEdli Unexecuted instantiation: _ZN5doris10vectorized7PowImplIllE5applyIdEEdll Unexecuted instantiation: _ZN5doris10vectorized7PowImplIlnE5applyIdEEdln Unexecuted instantiation: _ZN5doris10vectorized7PowImplIlfE5applyIdEEdlf Unexecuted instantiation: _ZN5doris10vectorized7PowImplIldE5applyIdEEdld Unexecuted instantiation: _ZN5doris10vectorized7PowImplInhE5applyIdEEdnh Unexecuted instantiation: _ZN5doris10vectorized7PowImplInaE5applyIdEEdna Unexecuted instantiation: _ZN5doris10vectorized7PowImplInsE5applyIdEEdns Unexecuted instantiation: _ZN5doris10vectorized7PowImplIniE5applyIdEEdni Unexecuted instantiation: _ZN5doris10vectorized7PowImplInlE5applyIdEEdnl Unexecuted instantiation: _ZN5doris10vectorized7PowImplInnE5applyIdEEdnn Unexecuted instantiation: _ZN5doris10vectorized7PowImplInfE5applyIdEEdnf Unexecuted instantiation: _ZN5doris10vectorized7PowImplIndE5applyIdEEdnd Unexecuted instantiation: _ZN5doris10vectorized7PowImplIfhE5applyIdEEdfh Unexecuted instantiation: _ZN5doris10vectorized7PowImplIfaE5applyIdEEdfa Unexecuted instantiation: _ZN5doris10vectorized7PowImplIfsE5applyIdEEdfs Unexecuted instantiation: _ZN5doris10vectorized7PowImplIfiE5applyIdEEdfi Unexecuted instantiation: _ZN5doris10vectorized7PowImplIflE5applyIdEEdfl Unexecuted instantiation: _ZN5doris10vectorized7PowImplIfnE5applyIdEEdfn Unexecuted instantiation: _ZN5doris10vectorized7PowImplIffE5applyIdEEdff Unexecuted instantiation: _ZN5doris10vectorized7PowImplIfdE5applyIdEEdfd Unexecuted instantiation: _ZN5doris10vectorized7PowImplIdhE5applyIdEEddh Unexecuted instantiation: _ZN5doris10vectorized7PowImplIdaE5applyIdEEdda Unexecuted instantiation: _ZN5doris10vectorized7PowImplIdsE5applyIdEEdds Unexecuted instantiation: _ZN5doris10vectorized7PowImplIdiE5applyIdEEddi Unexecuted instantiation: _ZN5doris10vectorized7PowImplIdlE5applyIdEEddl Unexecuted instantiation: _ZN5doris10vectorized7PowImplIdnE5applyIdEEddn Unexecuted instantiation: _ZN5doris10vectorized7PowImplIdfE5applyIdEEddf _ZN5doris10vectorized7PowImplIddE5applyIdEEddd Line | Count | Source | 367 | 4 | static inline double apply(A a, B b) { | 368 | | /// Next everywhere, static_cast - so that there is no wrong result in expressions of the form Int64 c = UInt32(a) * Int32(-1). | 369 | 4 | return std::pow((double)a, (double)b); | 370 | 4 | } |
|
371 | | }; |
372 | | struct PowName { |
373 | | static constexpr auto name = "pow"; |
374 | | }; |
375 | | using FunctionPow = FunctionBinaryArithmetic<PowImpl, PowName, false>; |
376 | | |
377 | | class FunctionNormalCdf : public IFunction { |
378 | | public: |
379 | | static constexpr auto name = "normal_cdf"; |
380 | | |
381 | 1 | String get_name() const override { return name; } |
382 | | |
383 | 2 | static FunctionPtr create() { return std::make_shared<FunctionNormalCdf>(); } |
384 | | |
385 | 0 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { |
386 | 0 | return make_nullable(std::make_shared<DataTypeFloat64>()); |
387 | 0 | } |
388 | | |
389 | 1 | DataTypes get_variadic_argument_types_impl() const override { |
390 | 1 | return {std::make_shared<DataTypeFloat64>(), std::make_shared<DataTypeFloat64>(), |
391 | 1 | std::make_shared<DataTypeFloat64>()}; |
392 | 1 | } |
393 | 0 | size_t get_number_of_arguments() const override { return 3; } |
394 | | |
395 | | Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, |
396 | 0 | size_t result, size_t input_rows_count) const override { |
397 | 0 | auto result_column = ColumnFloat64::create(input_rows_count); |
398 | 0 | auto result_null_map_column = ColumnUInt8::create(input_rows_count, 0); |
399 | |
|
400 | 0 | auto& result_data = result_column->get_data(); |
401 | 0 | NullMap& result_null_map = |
402 | 0 | assert_cast<ColumnUInt8*>(result_null_map_column.get())->get_data(); |
403 | |
|
404 | 0 | ColumnPtr argument_columns[3]; |
405 | 0 | bool col_const[3]; |
406 | 0 | size_t argument_size = arguments.size(); |
407 | 0 | for (int i = 0; i < argument_size; ++i) { Branch (407:25): [True: 0, False: 0]
|
408 | 0 | argument_columns[i] = block.get_by_position(arguments[i]).column; |
409 | 0 | col_const[i] = is_column_const(*argument_columns[i]); |
410 | 0 | if (col_const[i]) { Branch (410:17): [True: 0, False: 0]
|
411 | 0 | argument_columns[i] = |
412 | 0 | static_cast<const ColumnConst&>(*argument_columns[i]).get_data_column_ptr(); |
413 | 0 | } |
414 | 0 | } |
415 | |
|
416 | 0 | auto* mean_col = assert_cast<const ColumnFloat64*>(argument_columns[0].get()); |
417 | 0 | auto* sd_col = assert_cast<const ColumnFloat64*>(argument_columns[1].get()); |
418 | 0 | auto* value_col = assert_cast<const ColumnFloat64*>(argument_columns[2].get()); |
419 | |
|
420 | 0 | result_column->reserve(input_rows_count); |
421 | 0 | for (size_t i = 0; i < input_rows_count; ++i) { Branch (421:28): [True: 0, False: 0]
|
422 | 0 | double mean = mean_col->get_element(index_check_const(i, col_const[0])); |
423 | 0 | double sd = sd_col->get_element(index_check_const(i, col_const[1])); |
424 | 0 | double v = value_col->get_element(index_check_const(i, col_const[2])); |
425 | |
|
426 | 0 | if (!check_argument(sd)) [[unlikely]] { Branch (426:17): [True: 0, False: 0]
|
427 | 0 | result_null_map[i] = true; |
428 | 0 | continue; |
429 | 0 | } |
430 | 0 | result_data[i] = calculate_cell(mean, sd, v); |
431 | 0 | } |
432 | |
|
433 | 0 | block.get_by_position(result).column = |
434 | 0 | ColumnNullable::create(std::move(result_column), std::move(result_null_map_column)); |
435 | 0 | return Status::OK(); |
436 | 0 | } |
437 | | |
438 | 0 | static bool check_argument(double sd) { return sd > 0; } |
439 | 0 | static double calculate_cell(double mean, double sd, double v) { |
440 | | #ifdef __APPLE__ |
441 | | const double sqrt2 = std::sqrt(2); |
442 | | #else |
443 | 0 | constexpr double sqrt2 = std::numbers::sqrt2; |
444 | 0 | #endif |
445 | |
|
446 | 0 | return 0.5 * (std::erf((v - mean) / (sd * sqrt2)) + 1); |
447 | 0 | } |
448 | | }; |
449 | | |
450 | | // TODO: Now math may cause one thread compile time too long, because the function in math |
451 | | // so mush. Split it to speed up compile time in the future |
452 | 1 | void register_function_math(SimpleFunctionFactory& factory) { |
453 | 1 | factory.register_function<FunctionAcos>(); |
454 | 1 | factory.register_function<FunctionAsin>(); |
455 | 1 | factory.register_function<FunctionAtan>(); |
456 | 1 | factory.register_function<FunctionAtan2>(); |
457 | 1 | factory.register_function<FunctionCos>(); |
458 | 1 | factory.register_function<FunctionCosh>(); |
459 | 1 | factory.register_function<FunctionE>(); |
460 | 1 | factory.register_alias("ln", "dlog1"); |
461 | 1 | factory.register_function<FunctionLog>(); |
462 | 1 | factory.register_function<FunctionMathLog<ImplLn>>(); |
463 | 1 | factory.register_function<FunctionMathLog<ImplLog2>>(); |
464 | 1 | factory.register_function<FunctionMathLog<ImplLog10>>(); |
465 | 1 | factory.register_alias("log10", "dlog10"); |
466 | 1 | factory.register_function<FunctionPi>(); |
467 | 1 | factory.register_function<FunctionSign>(); |
468 | 1 | factory.register_function<FunctionAbs>(); |
469 | 1 | factory.register_function<FunctionNegative>(); |
470 | 1 | factory.register_function<FunctionPositive>(); |
471 | 1 | factory.register_function<FunctionSin>(); |
472 | 1 | factory.register_function<FunctionSqrt>(); |
473 | 1 | factory.register_alias("sqrt", "dsqrt"); |
474 | 1 | factory.register_function<FunctionCbrt>(); |
475 | 1 | factory.register_function<FunctionTan>(); |
476 | 1 | factory.register_function<FunctionTanh>(); |
477 | 1 | factory.register_function<FunctionCot>(); |
478 | 1 | factory.register_function<FunctionSec>(); |
479 | 1 | factory.register_function<FunctionCosec>(); |
480 | 1 | factory.register_function<FunctionPow>(); |
481 | 1 | factory.register_alias("pow", "power"); |
482 | 1 | factory.register_alias("pow", "dpow"); |
483 | 1 | factory.register_alias("pow", "fpow"); |
484 | 1 | factory.register_function<FunctionExp>(); |
485 | 1 | factory.register_alias("exp", "dexp"); |
486 | 1 | factory.register_function<FunctionRadians>(); |
487 | 1 | factory.register_function<FunctionDegrees>(); |
488 | 1 | factory.register_function<FunctionBin>(); |
489 | 1 | factory.register_function<FunctionNormalCdf>(); |
490 | 1 | } |
491 | | } // namespace doris::vectorized |