be/src/exec/common/arithmetic_overflow.h
Line | Count | Source |
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/base/base/arithmeticOverflow.h |
19 | | // and modified by Doris |
20 | | |
21 | | #pragma once |
22 | | |
23 | | #include "core/extended_types.h" |
24 | | namespace common { |
25 | | template <typename T> |
26 | 65.8k | inline bool add_overflow(T x, T y, T& res) { |
27 | 65.8k | return __builtin_add_overflow(x, y, &res); |
28 | 65.8k | } |
29 | | |
30 | | template <> |
31 | 489 | inline bool add_overflow(int x, int y, int& res) { |
32 | 489 | return __builtin_sadd_overflow(x, y, &res); |
33 | 489 | } |
34 | | |
35 | | template <> |
36 | 2.54M | inline bool add_overflow(long x, long y, long& res) { |
37 | 2.54M | return __builtin_saddl_overflow(x, y, &res); |
38 | 2.54M | } |
39 | | |
40 | | template <> |
41 | 0 | inline bool add_overflow(long long x, long long y, long long& res) { |
42 | 0 | return __builtin_saddll_overflow(x, y, &res); |
43 | 0 | } |
44 | | |
45 | | template <> |
46 | 3.80k | NO_SANITIZE_UNDEFINED inline bool add_overflow(__int128 x, __int128 y, __int128& res) { |
47 | 3.80k | static constexpr __int128 min_int128 = __int128(0x8000000000000000ll) << 64; |
48 | 3.80k | static constexpr __int128 max_int128 = |
49 | 3.80k | (__int128(0x7fffffffffffffffll) << 64) + 0xffffffffffffffffll; |
50 | 3.80k | res = x + y; |
51 | 3.80k | return (y > 0 && x > max_int128 - y) || (y < 0 && x < min_int128 - y); |
52 | 3.80k | } |
53 | | |
54 | | template <> |
55 | 86 | NO_SANITIZE_UNDEFINED inline bool add_overflow(wide::Int256 x, wide::Int256 y, wide::Int256& res) { |
56 | 86 | static constexpr wide::Int256 min_int256 = std::numeric_limits<wide::Int256>::min(); |
57 | 86 | static constexpr wide::Int256 max_int256 = std::numeric_limits<wide::Int256>::max(); |
58 | 86 | res = x + y; |
59 | 86 | return (y > 0 && x > max_int256 - y) || (y < 0 && x < min_int256 - y); |
60 | 86 | } |
61 | | template <typename T> |
62 | | inline bool sub_overflow(T x, T y, T& res) { |
63 | | return __builtin_sub_overflow(x, y, &res); |
64 | | } |
65 | | |
66 | | template <> |
67 | 388 | inline bool sub_overflow(int x, int y, int& res) { |
68 | 388 | return __builtin_ssub_overflow(x, y, &res); |
69 | 388 | } |
70 | | |
71 | | template <> |
72 | 2.88M | inline bool sub_overflow(long x, long y, long& res) { |
73 | 2.88M | return __builtin_ssubl_overflow(x, y, &res); |
74 | 2.88M | } |
75 | | |
76 | | template <> |
77 | 0 | inline bool sub_overflow(long long x, long long y, long long& res) { |
78 | 0 | return __builtin_ssubll_overflow(x, y, &res); |
79 | 0 | } |
80 | | |
81 | | template <> |
82 | 131k | inline bool sub_overflow(__int128 x, __int128 y, __int128& res) { |
83 | 131k | static constexpr __int128 min_int128 = __int128(0x8000000000000000ll) << 64; |
84 | 131k | static constexpr __int128 max_int128 = |
85 | 131k | (__int128(0x7fffffffffffffffll) << 64) + 0xffffffffffffffffll; |
86 | 131k | res = x - y; |
87 | 131k | return (y < 0 && x > max_int128 + y) || (y > 0 && x < min_int128 + y); |
88 | 131k | } |
89 | | |
90 | | template <> |
91 | 30 | inline bool sub_overflow(wide::Int256 x, wide::Int256 y, wide::Int256& res) { |
92 | 30 | static constexpr wide::Int256 min_int256 = std::numeric_limits<wide::Int256>::min(); |
93 | 30 | static constexpr wide::Int256 max_int256 = std::numeric_limits<wide::Int256>::max(); |
94 | 30 | res = x - y; |
95 | 30 | return (y < 0 && x > max_int256 + y) || (y > 0 && x < min_int256 + y); |
96 | 30 | } |
97 | | |
98 | | template <typename T> |
99 | 215 | inline bool mul_overflow(T x, T y, T& res) { |
100 | 215 | return __builtin_mul_overflow(x, y, &res); |
101 | 215 | } _ZN6common12mul_overflowImEEbT_S1_RS1_ Line | Count | Source | 99 | 215 | inline bool mul_overflow(T x, T y, T& res) { | 100 | 215 | return __builtin_mul_overflow(x, y, &res); | 101 | 215 | } |
Unexecuted instantiation: _ZN6common12mul_overflowIaEEbT_S1_RS1_ Unexecuted instantiation: _ZN6common12mul_overflowIsEEbT_S1_RS1_ |
102 | | |
103 | | template <> |
104 | 908 | inline bool mul_overflow(int x, int y, int& res) { |
105 | 908 | return __builtin_smul_overflow(x, y, &res); |
106 | 908 | } |
107 | | |
108 | | template <> |
109 | 31.6k | inline bool mul_overflow(long x, long y, long& res) { |
110 | 31.6k | return __builtin_smull_overflow(x, y, &res); |
111 | 31.6k | } |
112 | | |
113 | | template <> |
114 | 0 | inline bool mul_overflow(long long x, long long y, long long& res) { |
115 | 0 | return __builtin_smulll_overflow(x, y, &res); |
116 | 0 | } |
117 | | |
118 | | // from __muloXi4 in llvm's compiler-rt |
119 | 5.47M | static inline __int128 int128_overflow_mul(__int128 a, __int128 b, int* overflow) { |
120 | 5.47M | const int N = (int)(sizeof(__int128) * CHAR_BIT); |
121 | 5.47M | const auto MIN = (__int128)((__uint128_t)1 << (N - 1)); |
122 | 5.47M | const __int128 MAX = ~MIN; |
123 | 5.47M | *overflow = 0; |
124 | 5.47M | __int128 result = (__uint128_t)a * b; |
125 | 5.47M | if (a == MIN) { |
126 | 37 | if (b != 0 && b != 1) { |
127 | 37 | *overflow = 1; |
128 | 37 | } |
129 | 37 | return result; |
130 | 37 | } |
131 | 5.47M | if (b == MIN) { |
132 | 0 | if (a != 0 && a != 1) { |
133 | 0 | *overflow = 1; |
134 | 0 | } |
135 | 0 | return result; |
136 | 0 | } |
137 | 5.47M | __int128 sa = a >> (N - 1); |
138 | 5.47M | __int128 abs_a = (a ^ sa) - sa; |
139 | 5.47M | __int128 sb = b >> (N - 1); |
140 | 5.47M | __int128 abs_b = (b ^ sb) - sb; |
141 | 5.47M | if (abs_a < 2 || abs_b < 2) { |
142 | 1.00k | return result; |
143 | 1.00k | } |
144 | 5.47M | if (sa == sb) { |
145 | 5.47M | if (abs_a > MAX / abs_b) { |
146 | 134 | *overflow = 1; |
147 | 134 | } |
148 | 18.4E | } else { |
149 | 18.4E | if (abs_a > MIN / -abs_b) { |
150 | 25 | *overflow = 1; |
151 | 25 | } |
152 | 18.4E | } |
153 | 5.46M | return result; |
154 | 5.47M | } Unexecuted instantiation: doris_main.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_0_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: config.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_2_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi field.cpp:_ZN6commonL19int128_overflow_mulEnnPi Line | Count | Source | 119 | 5.47M | static inline __int128 int128_overflow_mul(__int128 a, __int128 b, int* overflow) { | 120 | 5.47M | const int N = (int)(sizeof(__int128) * CHAR_BIT); | 121 | 5.47M | const auto MIN = (__int128)((__uint128_t)1 << (N - 1)); | 122 | 5.47M | const __int128 MAX = ~MIN; | 123 | 5.47M | *overflow = 0; | 124 | 5.47M | __int128 result = (__uint128_t)a * b; | 125 | 5.47M | if (a == MIN) { | 126 | 37 | if (b != 0 && b != 1) { | 127 | 37 | *overflow = 1; | 128 | 37 | } | 129 | 37 | return result; | 130 | 37 | } | 131 | 5.47M | if (b == MIN) { | 132 | 0 | if (a != 0 && a != 1) { | 133 | 0 | *overflow = 1; | 134 | 0 | } | 135 | 0 | return result; | 136 | 0 | } | 137 | 5.47M | __int128 sa = a >> (N - 1); | 138 | 5.47M | __int128 abs_a = (a ^ sa) - sa; | 139 | 5.47M | __int128 sb = b >> (N - 1); | 140 | 5.47M | __int128 abs_b = (b ^ sb) - sb; | 141 | 5.47M | if (abs_a < 2 || abs_b < 2) { | 142 | 1.00k | return result; | 143 | 1.00k | } | 144 | 5.47M | if (sa == sb) { | 145 | 5.47M | if (abs_a > MAX / abs_b) { | 146 | 134 | *overflow = 1; | 147 | 134 | } | 148 | 18.4E | } else { | 149 | 18.4E | if (abs_a > MIN / -abs_b) { | 150 | 25 | *overflow = 1; | 151 | 25 | } | 152 | 18.4E | } | 153 | 5.46M | return result; | 154 | 5.47M | } |
Unexecuted instantiation: unity_3_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_1_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_5_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_6_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vdatetime_value.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: data_type_serde.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: data_type_number_serde.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_4_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: column_variant.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: convert_field_to_type.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_13_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_7_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_12_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_11_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_10_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_9_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_8_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: hashjoin_build_sink.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: join_build_sink_operator.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: operator.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: partitioned_aggregation_sink_operator.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: scan_operator.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vfile_result_writer.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_30_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_29_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_28_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_27_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_26_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_25_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_24_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_23_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_21_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_20_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_19_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_18_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_17_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_16_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_15_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: unity_14_cxx.cxx:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: aggregate_function_avg.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: aggregate_function_histogram.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: aggregate_function_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: aggregate_function_sum.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: ai_functions.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: function_array_aggregation.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: function_cast_decimal.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: function_date_or_datetime_computation.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: function_datetime_floor_ceil.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: function_jsonb_transform.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: in.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: minus.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: multiply.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: plus.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: round.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: uuid.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: arrow_row_batch.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: arrow_stream_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: csv_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: jni_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: new_json_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: native_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vorc_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: column_type_convert.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vparquet_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: schema_desc.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vparquet_group_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vparquet_column_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vparquet_column_chunk_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: decoder.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: byte_stream_split_decoder.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: fix_length_plain_decoder.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: byte_array_plain_decoder.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: bool_rle_decoder.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: bool_plain_decoder.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: byte_array_dict_decoder.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: delta_bit_pack_decoder.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: parquet_column_convert.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vparquet_page_index.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: parquet_block_split_bloom_filter.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: deletion_vector_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: es_http_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: es_scroll_parser.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: hive_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: hive_orc_nested_column_utils.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: hudi_jni_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: hudi_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: iceberg_delete_file_reader_helper.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: iceberg_position_delete_sys_table_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: iceberg_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: iceberg_orc_nested_column_utils.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: equality_delete.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: iceberg_sys_table_jni_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: jdbc_jni_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: max_compute_jni_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: paimon_cpp_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: paimon_jni_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: paimon_predicate_converter.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: paimon_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: parquet_metadata_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: parquet_utils.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: remote_doris_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: table_format_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: table_schema_change_helper.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: transactional_hive_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: trino_connector_jni_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: text_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: merge_partitioner.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: iceberg_partition_function.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vcsv_transformer.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vfile_format_transformer_factory.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vjni_format_transformer.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vnative_transformer.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vorc_transformer.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vparquet_transformer.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: adbc_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: collection_statistics.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: zone_map_index.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: vcollect_iterator.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: predicate_creator_comparison.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: predicate_creator_in_list_in.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: predicate_creator_in_list_not_in.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: tablet.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: engine_clone_task.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: descriptors.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: backend_service.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: internal_service.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: point_query_executor.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: be_server_starter_factory.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: http_service.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: arrow_flight_batch_reader.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: thrift_util.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: load_stream.cpp:_ZN6commonL19int128_overflow_mulEnnPi Unexecuted instantiation: cloud_compaction_action.cpp:_ZN6commonL19int128_overflow_mulEnnPi |
155 | | |
156 | | template <> |
157 | 5.45M | inline bool mul_overflow(__int128 x, __int128 y, __int128& res) { |
158 | 5.45M | int overflow = 0; |
159 | 5.45M | res = int128_overflow_mul(x, y, &overflow); |
160 | 5.45M | return overflow != 0; |
161 | 5.45M | } |
162 | | |
163 | | static inline wide::Int256 int256_overflow_mul(const wide::Int256& a, const wide::Int256& b, |
164 | 1.69k | int* overflow) { |
165 | 1.69k | const int N = (int)(sizeof(wide::Int256) * CHAR_BIT); |
166 | 1.69k | const auto MIN = (wide::Int256)((wide::UInt256)1 << (N - 1)); |
167 | 1.69k | const wide::Int256 MAX = ~MIN; |
168 | 1.69k | *overflow = 0; |
169 | 1.69k | wide::Int256 result = a * b; |
170 | 1.69k | if (a == MIN) { |
171 | 0 | if (b != 0 && b != 1) { |
172 | 0 | *overflow = 1; |
173 | 0 | } |
174 | 0 | return result; |
175 | 0 | } |
176 | 1.69k | if (b == MIN) { |
177 | 0 | if (a != 0 && a != 1) { |
178 | 0 | *overflow = 1; |
179 | 0 | } |
180 | 0 | return result; |
181 | 0 | } |
182 | 1.69k | wide::Int256 sa = a >> (N - 1); |
183 | 1.69k | wide::Int256 abs_a = (a ^ sa) - sa; |
184 | 1.69k | wide::Int256 sb = b >> (N - 1); |
185 | 1.69k | wide::Int256 abs_b = (b ^ sb) - sb; |
186 | 1.69k | if (abs_a < 2 || abs_b < 2) { |
187 | 324 | return result; |
188 | 324 | } |
189 | 1.36k | if (sa == sb) { |
190 | 1.11k | if (abs_a > MAX / abs_b) { |
191 | 55 | *overflow = 1; |
192 | 55 | } |
193 | 1.11k | } else { |
194 | 253 | if (abs_a > MIN / -abs_b) { |
195 | 30 | *overflow = 1; |
196 | 30 | } |
197 | 253 | } |
198 | 1.36k | return result; |
199 | 1.69k | } Unexecuted instantiation: doris_main.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_0_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: config.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_2_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi field.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Line | Count | Source | 164 | 1.69k | int* overflow) { | 165 | 1.69k | const int N = (int)(sizeof(wide::Int256) * CHAR_BIT); | 166 | 1.69k | const auto MIN = (wide::Int256)((wide::UInt256)1 << (N - 1)); | 167 | 1.69k | const wide::Int256 MAX = ~MIN; | 168 | 1.69k | *overflow = 0; | 169 | 1.69k | wide::Int256 result = a * b; | 170 | 1.69k | if (a == MIN) { | 171 | 0 | if (b != 0 && b != 1) { | 172 | 0 | *overflow = 1; | 173 | 0 | } | 174 | 0 | return result; | 175 | 0 | } | 176 | 1.69k | if (b == MIN) { | 177 | 0 | if (a != 0 && a != 1) { | 178 | 0 | *overflow = 1; | 179 | 0 | } | 180 | 0 | return result; | 181 | 0 | } | 182 | 1.69k | wide::Int256 sa = a >> (N - 1); | 183 | 1.69k | wide::Int256 abs_a = (a ^ sa) - sa; | 184 | 1.69k | wide::Int256 sb = b >> (N - 1); | 185 | 1.69k | wide::Int256 abs_b = (b ^ sb) - sb; | 186 | 1.69k | if (abs_a < 2 || abs_b < 2) { | 187 | 324 | return result; | 188 | 324 | } | 189 | 1.36k | if (sa == sb) { | 190 | 1.11k | if (abs_a > MAX / abs_b) { | 191 | 55 | *overflow = 1; | 192 | 55 | } | 193 | 1.11k | } else { | 194 | 253 | if (abs_a > MIN / -abs_b) { | 195 | 30 | *overflow = 1; | 196 | 30 | } | 197 | 253 | } | 198 | 1.36k | return result; | 199 | 1.69k | } |
Unexecuted instantiation: unity_3_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_1_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_5_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_6_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vdatetime_value.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: data_type_serde.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: data_type_number_serde.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_4_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: column_variant.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: convert_field_to_type.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_13_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_7_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_12_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_11_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_10_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_9_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_8_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: hashjoin_build_sink.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: join_build_sink_operator.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: operator.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: partitioned_aggregation_sink_operator.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: scan_operator.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vfile_result_writer.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_30_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_29_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_28_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_27_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_26_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_25_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_24_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_23_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_21_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_20_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_19_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_18_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_17_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_16_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_15_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: unity_14_cxx.cxx:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: aggregate_function_avg.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: aggregate_function_histogram.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: aggregate_function_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: aggregate_function_sum.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: ai_functions.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: function_array_aggregation.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: function_cast_decimal.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: function_date_or_datetime_computation.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: function_datetime_floor_ceil.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: function_jsonb_transform.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: in.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: minus.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: multiply.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: plus.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: round.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: uuid.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: arrow_row_batch.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: arrow_stream_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: csv_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: jni_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: new_json_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: native_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vorc_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: column_type_convert.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vparquet_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: schema_desc.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vparquet_group_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vparquet_column_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vparquet_column_chunk_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: decoder.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: byte_stream_split_decoder.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: fix_length_plain_decoder.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: byte_array_plain_decoder.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: bool_rle_decoder.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: bool_plain_decoder.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: byte_array_dict_decoder.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: delta_bit_pack_decoder.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: parquet_column_convert.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vparquet_page_index.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: parquet_block_split_bloom_filter.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: deletion_vector_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: es_http_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: es_scroll_parser.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: hive_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: hive_orc_nested_column_utils.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: hudi_jni_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: hudi_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: iceberg_delete_file_reader_helper.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: iceberg_position_delete_sys_table_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: iceberg_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: iceberg_orc_nested_column_utils.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: equality_delete.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: iceberg_sys_table_jni_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: jdbc_jni_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: max_compute_jni_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: paimon_cpp_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: paimon_jni_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: paimon_predicate_converter.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: paimon_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: parquet_metadata_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: parquet_utils.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: remote_doris_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: table_format_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: table_schema_change_helper.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: transactional_hive_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: trino_connector_jni_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: text_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: merge_partitioner.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: iceberg_partition_function.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vcsv_transformer.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vfile_format_transformer_factory.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vjni_format_transformer.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vnative_transformer.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vorc_transformer.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vparquet_transformer.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: adbc_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: collection_statistics.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: zone_map_index.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: vcollect_iterator.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: predicate_creator_comparison.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: predicate_creator_in_list_in.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: predicate_creator_in_list_not_in.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: tablet.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: engine_clone_task.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: descriptors.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: backend_service.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: internal_service.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: point_query_executor.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: be_server_starter_factory.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: http_service.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: arrow_flight_batch_reader.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: thrift_util.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: load_stream.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi Unexecuted instantiation: cloud_compaction_action.cpp:_ZN6commonL19int256_overflow_mulERKN4wide7integerILm256EiEES4_Pi |
200 | | template <> |
201 | 4.13k | inline bool mul_overflow(wide::Int256 x, wide::Int256 y, wide::Int256& res) { |
202 | 4.13k | int overflow = 0; |
203 | 4.13k | res = int256_overflow_mul(x, y, &overflow); |
204 | 4.13k | return overflow != 0; |
205 | 4.13k | } |
206 | | } // namespace common |