be/src/util/pdep_unpack.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 | | |
18 | | #pragma once |
19 | | |
20 | | #if defined(__x86_64__) && (defined(__GNUC__) || defined(__clang__)) |
21 | | |
22 | | #include <immintrin.h> |
23 | | |
24 | | #include <cstddef> |
25 | | #include <cstdint> |
26 | | #include <cstring> |
27 | | #include <limits> |
28 | | #include <type_traits> |
29 | | #include <utility> |
30 | | |
31 | | #include "common/config.h" |
32 | | |
33 | | namespace doris { |
34 | | |
35 | | class PdepUnpack { |
36 | | public: |
37 | 4.08k | static bool is_supported() { |
38 | 4.08k | return config::enable_bmi2_optimizations && __builtin_cpu_supports("bmi2") && |
39 | 4.08k | __builtin_cpu_supports("avx2"); |
40 | 4.08k | } |
41 | | |
42 | | template <typename T, int BIT_WIDTH> |
43 | 0 | static constexpr bool is_supported_type() { |
44 | 0 | return BIT_WIDTH > 0 && BIT_WIDTH <= std::numeric_limits<T>::digits && |
45 | 0 | (std::is_same_v<T, uint8_t> || std::is_same_v<T, uint16_t> || |
46 | 0 | std::is_same_v<T, uint32_t>); |
47 | 0 | } Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi0EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi1EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi2EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi3EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi4EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi5EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi6EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi7EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi8EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi9EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi10EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi11EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi12EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi13EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi14EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi15EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi16EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi17EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi18EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi19EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi20EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi21EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi22EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi23EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi24EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi25EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi26EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi27EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi28EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi29EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi30EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi31EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi32EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi33EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi34EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi35EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi36EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi37EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi38EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi39EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi40EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi41EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi42EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi43EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi44EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi45EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi46EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi47EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi48EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi49EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi50EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi51EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi52EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi53EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi54EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi55EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi56EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi57EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi58EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi59EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi60EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi61EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi62EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi63EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIjLi64EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi0EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi1EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi2EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi3EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi4EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi5EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi6EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi7EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi8EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi9EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi10EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi11EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi12EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi13EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi14EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi15EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi16EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi17EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi18EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi19EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi20EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi21EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi22EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi23EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi24EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi25EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi26EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi27EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi28EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi29EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi30EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi31EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi32EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi33EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi34EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi35EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi36EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi37EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi38EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi39EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi40EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi41EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi42EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi43EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi44EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi45EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi46EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi47EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi48EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi49EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi50EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi51EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi52EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi53EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi54EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi55EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi56EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi57EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi58EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi59EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi60EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi61EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi62EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi63EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack17is_supported_typeIhLi64EEEbv |
48 | | |
49 | | template <typename T, int BIT_WIDTH> |
50 | 0 | static constexpr bool should_use() { |
51 | 0 | // Keep the generic implementation available for benchmarking all supported widths, but |
52 | 0 | // only select PDEP in the production path for widths below 16. These widths can use the |
53 | 0 | // byte/word deposit layouts and the AVX2 widening specializations below. At 16 bits and |
54 | 0 | // above, unpack32() falls back to multiple generic 64-bit PDEP groups per batch and |
55 | 0 | // competes with efficient scalar specializations, including copy-like 16- and 32-bit |
56 | 0 | // cases. Benchmarks with L1-, L2-, and larger working sets show non-monotonic results and |
57 | 0 | // repeatable regressions for multiple high widths. Because the profitable high widths are |
58 | 0 | // CPU- and working-set-dependent, an irregular per-width allowlist would not be portable; |
59 | 0 | // use the scalar implementation conservatively instead. |
60 | 0 | return is_supported_type<T, BIT_WIDTH>() && BIT_WIDTH < 16; |
61 | 0 | } Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi0EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi1EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi2EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi3EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi4EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi5EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi6EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi7EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi8EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi9EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi10EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi11EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi12EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi13EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi14EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi15EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi16EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi17EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi18EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi19EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi20EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi21EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi22EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi23EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi24EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi25EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi26EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi27EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi28EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi29EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi30EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi31EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi32EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi33EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi34EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi35EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi36EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi37EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi38EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi39EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi40EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi41EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi42EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi43EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi44EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi45EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi46EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi47EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi48EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi49EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi50EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi51EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi52EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi53EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi54EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi55EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi56EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi57EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi58EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi59EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi60EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi61EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi62EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi63EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIjLi64EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi0EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi1EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi2EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi3EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi4EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi5EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi6EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi7EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi8EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi9EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi10EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi11EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi12EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi13EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi14EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi15EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi16EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi17EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi18EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi19EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi20EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi21EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi22EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi23EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi24EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi25EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi26EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi27EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi28EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi29EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi30EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi31EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi32EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi33EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi34EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi35EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi36EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi37EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi38EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi39EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi40EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi41EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi42EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi43EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi44EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi45EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi46EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi47EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi48EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi49EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi50EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi51EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi52EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi53EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi54EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi55EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi56EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi57EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi58EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi59EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi60EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi61EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi62EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi63EEEbv Unexecuted instantiation: _ZN5doris10PdepUnpack10should_useIhLi64EEEbv |
62 | | |
63 | | template <typename T, int BIT_WIDTH> |
64 | 54.9k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { |
65 | 54.9k | static_assert(is_supported_type<T, BIT_WIDTH>()); |
66 | 54.9k | if constexpr (std::is_same_v<T, uint8_t>) { |
67 | 256 | unpack32_with_pdep<T, BIT_WIDTH>(input, output); |
68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { |
69 | | for (int group = 0; group < 2; ++group) { |
70 | | const int first_value = group * 16; |
71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; |
72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), |
73 | | pdep_mask<uint8_t, BIT_WIDTH>()); |
74 | | uint64_t expanded1 = |
75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), |
76 | | pdep_mask<uint8_t, BIT_WIDTH>()); |
77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), |
78 | | static_cast<int64_t>(expanded0)); |
79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); |
80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); |
81 | | } |
82 | 33.9k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { |
83 | 169k | for (int group = 0; group < 4; ++group) { |
84 | 135k | uint64_t expanded = |
85 | 135k | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), |
86 | 135k | pdep_mask<uint8_t, BIT_WIDTH>()); |
87 | 135k | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); |
88 | 135k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); |
89 | 135k | } |
90 | 33.9k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { |
91 | 103k | for (int group = 0; group < 4; ++group) { |
92 | 83.0k | const int first_value = group * 8; |
93 | 83.0k | const uint8_t* group_input = input + group * BIT_WIDTH; |
94 | 83.0k | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), |
95 | 83.0k | pdep_mask<uint16_t, BIT_WIDTH>()); |
96 | 83.0k | uint64_t expanded1 = |
97 | 83.0k | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), |
98 | 83.0k | pdep_mask<uint16_t, BIT_WIDTH>()); |
99 | 83.0k | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), |
100 | 83.0k | static_cast<int64_t>(expanded0)); |
101 | 83.0k | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); |
102 | 83.0k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); |
103 | 83.0k | } |
104 | | } else { |
105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); |
106 | | } |
107 | 54.9k | } _ZN5doris10PdepUnpack8unpack32IjLi1EEEvPKhPT_ Line | Count | Source | 64 | 52 | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 52 | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | 52 | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | 260 | for (int group = 0; group < 4; ++group) { | 84 | 208 | uint64_t expanded = | 85 | 208 | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | 208 | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | 208 | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | 208 | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | 208 | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 52 | } |
_ZN5doris10PdepUnpack8unpack32IjLi2EEEvPKhPT_ Line | Count | Source | 64 | 2.48k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 2.48k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | 2.48k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | 12.4k | for (int group = 0; group < 4; ++group) { | 84 | 9.94k | uint64_t expanded = | 85 | 9.94k | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | 9.94k | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | 9.94k | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | 9.94k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | 9.94k | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 2.48k | } |
_ZN5doris10PdepUnpack8unpack32IjLi3EEEvPKhPT_ Line | Count | Source | 64 | 13.5k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 13.5k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | 13.5k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | 67.9k | for (int group = 0; group < 4; ++group) { | 84 | 54.3k | uint64_t expanded = | 85 | 54.3k | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | 54.3k | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | 54.3k | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | 54.3k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | 54.3k | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 13.5k | } |
_ZN5doris10PdepUnpack8unpack32IjLi4EEEvPKhPT_ Line | Count | Source | 64 | 2.41k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 2.41k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | 2.41k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | 12.0k | for (int group = 0; group < 4; ++group) { | 84 | 9.64k | uint64_t expanded = | 85 | 9.64k | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | 9.64k | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | 9.64k | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | 9.64k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | 9.64k | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 2.41k | } |
_ZN5doris10PdepUnpack8unpack32IjLi5EEEvPKhPT_ Line | Count | Source | 64 | 4.11k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 4.11k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | 4.11k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | 20.5k | for (int group = 0; group < 4; ++group) { | 84 | 16.4k | uint64_t expanded = | 85 | 16.4k | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | 16.4k | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | 16.4k | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | 16.4k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | 16.4k | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 4.11k | } |
_ZN5doris10PdepUnpack8unpack32IjLi6EEEvPKhPT_ Line | Count | Source | 64 | 2.41k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 2.41k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | 2.41k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | 12.0k | for (int group = 0; group < 4; ++group) { | 84 | 9.67k | uint64_t expanded = | 85 | 9.67k | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | 9.67k | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | 9.67k | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | 9.67k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | 9.67k | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 2.41k | } |
_ZN5doris10PdepUnpack8unpack32IjLi7EEEvPKhPT_ Line | Count | Source | 64 | 5.27k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 5.27k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | 5.27k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | 26.3k | for (int group = 0; group < 4; ++group) { | 84 | 21.0k | uint64_t expanded = | 85 | 21.0k | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | 21.0k | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | 21.0k | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | 21.0k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | 21.0k | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 5.27k | } |
_ZN5doris10PdepUnpack8unpack32IjLi8EEEvPKhPT_ Line | Count | Source | 64 | 3.61k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 3.61k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | 3.61k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | 18.0k | for (int group = 0; group < 4; ++group) { | 84 | 14.4k | uint64_t expanded = | 85 | 14.4k | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | 14.4k | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | 14.4k | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | 14.4k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | 14.4k | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 3.61k | } |
_ZN5doris10PdepUnpack8unpack32IjLi9EEEvPKhPT_ Line | Count | Source | 64 | 932 | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 932 | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | 932 | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | 4.66k | for (int group = 0; group < 4; ++group) { | 92 | 3.72k | const int first_value = group * 8; | 93 | 3.72k | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | 3.72k | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | 3.72k | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | 3.72k | uint64_t expanded1 = | 97 | 3.72k | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | 3.72k | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | 3.72k | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | 3.72k | static_cast<int64_t>(expanded0)); | 101 | 3.72k | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | 3.72k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | 3.72k | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 932 | } |
_ZN5doris10PdepUnpack8unpack32IjLi10EEEvPKhPT_ Line | Count | Source | 64 | 1.92k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 1.92k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | 1.92k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | 9.60k | for (int group = 0; group < 4; ++group) { | 92 | 7.68k | const int first_value = group * 8; | 93 | 7.68k | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | 7.68k | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | 7.68k | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | 7.68k | uint64_t expanded1 = | 97 | 7.68k | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | 7.68k | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | 7.68k | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | 7.68k | static_cast<int64_t>(expanded0)); | 101 | 7.68k | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | 7.68k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | 7.68k | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 1.92k | } |
_ZN5doris10PdepUnpack8unpack32IjLi11EEEvPKhPT_ Line | Count | Source | 64 | 4.53k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 4.53k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | 4.53k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | 22.6k | for (int group = 0; group < 4; ++group) { | 92 | 18.1k | const int first_value = group * 8; | 93 | 18.1k | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | 18.1k | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | 18.1k | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | 18.1k | uint64_t expanded1 = | 97 | 18.1k | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | 18.1k | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | 18.1k | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | 18.1k | static_cast<int64_t>(expanded0)); | 101 | 18.1k | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | 18.1k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | 18.1k | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 4.53k | } |
_ZN5doris10PdepUnpack8unpack32IjLi12EEEvPKhPT_ Line | Count | Source | 64 | 4.87k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 4.87k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | 4.87k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | 24.3k | for (int group = 0; group < 4; ++group) { | 92 | 19.5k | const int first_value = group * 8; | 93 | 19.5k | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | 19.5k | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | 19.5k | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | 19.5k | uint64_t expanded1 = | 97 | 19.5k | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | 19.5k | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | 19.5k | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | 19.5k | static_cast<int64_t>(expanded0)); | 101 | 19.5k | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | 19.5k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | 19.5k | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 4.87k | } |
_ZN5doris10PdepUnpack8unpack32IjLi13EEEvPKhPT_ Line | Count | Source | 64 | 532 | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 532 | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | 532 | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | 2.66k | for (int group = 0; group < 4; ++group) { | 92 | 2.12k | const int first_value = group * 8; | 93 | 2.12k | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | 2.12k | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | 2.12k | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | 2.12k | uint64_t expanded1 = | 97 | 2.12k | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | 2.12k | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | 2.12k | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | 2.12k | static_cast<int64_t>(expanded0)); | 101 | 2.12k | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | 2.12k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | 2.12k | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 532 | } |
_ZN5doris10PdepUnpack8unpack32IjLi14EEEvPKhPT_ Line | Count | Source | 64 | 4.27k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 4.27k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | 4.27k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | 21.3k | for (int group = 0; group < 4; ++group) { | 92 | 17.0k | const int first_value = group * 8; | 93 | 17.0k | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | 17.0k | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | 17.0k | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | 17.0k | uint64_t expanded1 = | 97 | 17.0k | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | 17.0k | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | 17.0k | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | 17.0k | static_cast<int64_t>(expanded0)); | 101 | 17.0k | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | 17.0k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | 17.0k | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 4.27k | } |
_ZN5doris10PdepUnpack8unpack32IjLi15EEEvPKhPT_ Line | Count | Source | 64 | 3.70k | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 3.70k | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | 3.70k | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | 18.5k | for (int group = 0; group < 4; ++group) { | 92 | 14.8k | const int first_value = group * 8; | 93 | 14.8k | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | 14.8k | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | 14.8k | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | 14.8k | uint64_t expanded1 = | 97 | 14.8k | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | 14.8k | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | 14.8k | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | 14.8k | static_cast<int64_t>(expanded0)); | 101 | 14.8k | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | 14.8k | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | 14.8k | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 3.70k | } |
_ZN5doris10PdepUnpack8unpack32IhLi1EEEvPKhPT_ Line | Count | Source | 64 | 172 | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 172 | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | 172 | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | 172 | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 172 | } |
_ZN5doris10PdepUnpack8unpack32IhLi2EEEvPKhPT_ Line | Count | Source | 64 | 12 | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 12 | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | 12 | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | 12 | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 12 | } |
_ZN5doris10PdepUnpack8unpack32IhLi3EEEvPKhPT_ Line | Count | Source | 64 | 12 | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 12 | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | 12 | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | 12 | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 12 | } |
_ZN5doris10PdepUnpack8unpack32IhLi4EEEvPKhPT_ Line | Count | Source | 64 | 12 | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 12 | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | 12 | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | 12 | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 12 | } |
_ZN5doris10PdepUnpack8unpack32IhLi5EEEvPKhPT_ Line | Count | Source | 64 | 12 | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 12 | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | 12 | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | 12 | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 12 | } |
_ZN5doris10PdepUnpack8unpack32IhLi6EEEvPKhPT_ Line | Count | Source | 64 | 12 | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 12 | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | 12 | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | 12 | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 12 | } |
_ZN5doris10PdepUnpack8unpack32IhLi7EEEvPKhPT_ Line | Count | Source | 64 | 12 | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 12 | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | 12 | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | 12 | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 12 | } |
_ZN5doris10PdepUnpack8unpack32IhLi8EEEvPKhPT_ Line | Count | Source | 64 | 12 | __attribute__((target("bmi2,avx2"))) static void unpack32(const uint8_t* input, T* output) { | 65 | 12 | static_assert(is_supported_type<T, BIT_WIDTH>()); | 66 | 12 | if constexpr (std::is_same_v<T, uint8_t>) { | 67 | 12 | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 68 | | } else if constexpr (std::is_same_v<T, uint16_t> && BIT_WIDTH <= 8) { | 69 | | for (int group = 0; group < 2; ++group) { | 70 | | const int first_value = group * 16; | 71 | | const uint8_t* group_input = input + group * 2 * BIT_WIDTH; | 72 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(group_input), | 73 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 74 | | uint64_t expanded1 = | 75 | | _pdep_u64(load_packed_group<8 * BIT_WIDTH, 8 * BIT_WIDTH>(group_input), | 76 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 77 | | __m128i packed8 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 78 | | static_cast<int64_t>(expanded0)); | 79 | | __m256i unpacked16 = _mm256_cvtepu8_epi16(packed8); | 80 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked16); | 81 | | } | 82 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 8) { | 83 | | for (int group = 0; group < 4; ++group) { | 84 | | uint64_t expanded = | 85 | | _pdep_u64(load_packed_group<0, 8 * BIT_WIDTH>(input + group * BIT_WIDTH), | 86 | | pdep_mask<uint8_t, BIT_WIDTH>()); | 87 | | __m256i unpacked32 = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(expanded)); | 88 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + group * 8), unpacked32); | 89 | | } | 90 | | } else if constexpr (std::is_same_v<T, uint32_t> && BIT_WIDTH <= 15) { | 91 | | for (int group = 0; group < 4; ++group) { | 92 | | const int first_value = group * 8; | 93 | | const uint8_t* group_input = input + group * BIT_WIDTH; | 94 | | uint64_t expanded0 = _pdep_u64(load_packed_group<0, 4 * BIT_WIDTH>(group_input), | 95 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 96 | | uint64_t expanded1 = | 97 | | _pdep_u64(load_packed_group<4 * BIT_WIDTH, 4 * BIT_WIDTH>(group_input), | 98 | | pdep_mask<uint16_t, BIT_WIDTH>()); | 99 | | __m128i packed16 = _mm_set_epi64x(static_cast<int64_t>(expanded1), | 100 | | static_cast<int64_t>(expanded0)); | 101 | | __m256i unpacked32 = _mm256_cvtepu16_epi32(packed16); | 102 | | _mm256_storeu_si256(reinterpret_cast<__m256i*>(output + first_value), unpacked32); | 103 | | } | 104 | | } else { | 105 | | unpack32_with_pdep<T, BIT_WIDTH>(input, output); | 106 | | } | 107 | 12 | } |
|
108 | | |
109 | | private: |
110 | | template <typename T, int BIT_WIDTH> |
111 | 304k | static constexpr uint64_t pdep_mask() { |
112 | 304k | constexpr int lane_bits = sizeof(T) * 8; |
113 | 304k | constexpr int lanes = 64 / lane_bits; |
114 | 304k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; |
115 | 304k | uint64_t mask = 0; |
116 | 2.06M | for (int lane = 0; lane < lanes; ++lane) { |
117 | 1.76M | mask |= value_mask << (lane * lane_bits); |
118 | 1.76M | } |
119 | 304k | return mask; |
120 | 304k | } _ZN5doris10PdepUnpack9pdep_maskIhLi1EEEmv Line | Count | Source | 111 | 944 | static constexpr uint64_t pdep_mask() { | 112 | 944 | constexpr int lane_bits = sizeof(T) * 8; | 113 | 944 | constexpr int lanes = 64 / lane_bits; | 114 | 944 | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 944 | uint64_t mask = 0; | 116 | 8.49k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 7.55k | mask |= value_mask << (lane * lane_bits); | 118 | 7.55k | } | 119 | 944 | return mask; | 120 | 944 | } |
_ZN5doris10PdepUnpack9pdep_maskIhLi2EEEmv Line | Count | Source | 111 | 10.0k | static constexpr uint64_t pdep_mask() { | 112 | 10.0k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 10.0k | constexpr int lanes = 64 / lane_bits; | 114 | 10.0k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 10.0k | uint64_t mask = 0; | 116 | 90.3k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 80.3k | mask |= value_mask << (lane * lane_bits); | 118 | 80.3k | } | 119 | 10.0k | return mask; | 120 | 10.0k | } |
_ZN5doris10PdepUnpack9pdep_maskIhLi3EEEmv Line | Count | Source | 111 | 54.4k | static constexpr uint64_t pdep_mask() { | 112 | 54.4k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 54.4k | constexpr int lanes = 64 / lane_bits; | 114 | 54.4k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 54.4k | uint64_t mask = 0; | 116 | 490k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 435k | mask |= value_mask << (lane * lane_bits); | 118 | 435k | } | 119 | 54.4k | return mask; | 120 | 54.4k | } |
_ZN5doris10PdepUnpack9pdep_maskIhLi4EEEmv Line | Count | Source | 111 | 9.74k | static constexpr uint64_t pdep_mask() { | 112 | 9.74k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 9.74k | constexpr int lanes = 64 / lane_bits; | 114 | 9.74k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 9.74k | uint64_t mask = 0; | 116 | 87.6k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 77.9k | mask |= value_mask << (lane * lane_bits); | 118 | 77.9k | } | 119 | 9.74k | return mask; | 120 | 9.74k | } |
_ZN5doris10PdepUnpack9pdep_maskIhLi5EEEmv Line | Count | Source | 111 | 16.5k | static constexpr uint64_t pdep_mask() { | 112 | 16.5k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 16.5k | constexpr int lanes = 64 / lane_bits; | 114 | 16.5k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 16.5k | uint64_t mask = 0; | 116 | 148k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 132k | mask |= value_mask << (lane * lane_bits); | 118 | 132k | } | 119 | 16.5k | return mask; | 120 | 16.5k | } |
_ZN5doris10PdepUnpack9pdep_maskIhLi6EEEmv Line | Count | Source | 111 | 9.76k | static constexpr uint64_t pdep_mask() { | 112 | 9.76k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 9.76k | constexpr int lanes = 64 / lane_bits; | 114 | 9.76k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 9.76k | uint64_t mask = 0; | 116 | 87.9k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 78.1k | mask |= value_mask << (lane * lane_bits); | 118 | 78.1k | } | 119 | 9.76k | return mask; | 120 | 9.76k | } |
_ZN5doris10PdepUnpack9pdep_maskIhLi7EEEmv Line | Count | Source | 111 | 21.1k | static constexpr uint64_t pdep_mask() { | 112 | 21.1k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 21.1k | constexpr int lanes = 64 / lane_bits; | 114 | 21.1k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 21.1k | uint64_t mask = 0; | 116 | 190k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 169k | mask |= value_mask << (lane * lane_bits); | 118 | 169k | } | 119 | 21.1k | return mask; | 120 | 21.1k | } |
_ZN5doris10PdepUnpack9pdep_maskIhLi8EEEmv Line | Count | Source | 111 | 14.5k | static constexpr uint64_t pdep_mask() { | 112 | 14.5k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 14.5k | constexpr int lanes = 64 / lane_bits; | 114 | 14.5k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 14.5k | uint64_t mask = 0; | 116 | 131k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 116k | mask |= value_mask << (lane * lane_bits); | 118 | 116k | } | 119 | 14.5k | return mask; | 120 | 14.5k | } |
_ZN5doris10PdepUnpack9pdep_maskItLi9EEEmv Line | Count | Source | 111 | 7.55k | static constexpr uint64_t pdep_mask() { | 112 | 7.55k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 7.55k | constexpr int lanes = 64 / lane_bits; | 114 | 7.55k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 7.55k | uint64_t mask = 0; | 116 | 37.7k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 30.2k | mask |= value_mask << (lane * lane_bits); | 118 | 30.2k | } | 119 | 7.55k | return mask; | 120 | 7.55k | } |
_ZN5doris10PdepUnpack9pdep_maskItLi10EEEmv Line | Count | Source | 111 | 15.4k | static constexpr uint64_t pdep_mask() { | 112 | 15.4k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 15.4k | constexpr int lanes = 64 / lane_bits; | 114 | 15.4k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 15.4k | uint64_t mask = 0; | 116 | 77.3k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 61.8k | mask |= value_mask << (lane * lane_bits); | 118 | 61.8k | } | 119 | 15.4k | return mask; | 120 | 15.4k | } |
_ZN5doris10PdepUnpack9pdep_maskItLi11EEEmv Line | Count | Source | 111 | 36.3k | static constexpr uint64_t pdep_mask() { | 112 | 36.3k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 36.3k | constexpr int lanes = 64 / lane_bits; | 114 | 36.3k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 36.3k | uint64_t mask = 0; | 116 | 181k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 145k | mask |= value_mask << (lane * lane_bits); | 118 | 145k | } | 119 | 36.3k | return mask; | 120 | 36.3k | } |
_ZN5doris10PdepUnpack9pdep_maskItLi12EEEmv Line | Count | Source | 111 | 39.1k | static constexpr uint64_t pdep_mask() { | 112 | 39.1k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 39.1k | constexpr int lanes = 64 / lane_bits; | 114 | 39.1k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 39.1k | uint64_t mask = 0; | 116 | 195k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 156k | mask |= value_mask << (lane * lane_bits); | 118 | 156k | } | 119 | 39.1k | return mask; | 120 | 39.1k | } |
_ZN5doris10PdepUnpack9pdep_maskItLi13EEEmv Line | Count | Source | 111 | 4.35k | static constexpr uint64_t pdep_mask() { | 112 | 4.35k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 4.35k | constexpr int lanes = 64 / lane_bits; | 114 | 4.35k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 4.35k | uint64_t mask = 0; | 116 | 21.7k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 17.4k | mask |= value_mask << (lane * lane_bits); | 118 | 17.4k | } | 119 | 4.35k | return mask; | 120 | 4.35k | } |
_ZN5doris10PdepUnpack9pdep_maskItLi14EEEmv Line | Count | Source | 111 | 34.2k | static constexpr uint64_t pdep_mask() { | 112 | 34.2k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 34.2k | constexpr int lanes = 64 / lane_bits; | 114 | 34.2k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 34.2k | uint64_t mask = 0; | 116 | 171k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 137k | mask |= value_mask << (lane * lane_bits); | 118 | 137k | } | 119 | 34.2k | return mask; | 120 | 34.2k | } |
_ZN5doris10PdepUnpack9pdep_maskItLi15EEEmv Line | Count | Source | 111 | 29.6k | static constexpr uint64_t pdep_mask() { | 112 | 29.6k | constexpr int lane_bits = sizeof(T) * 8; | 113 | 29.6k | constexpr int lanes = 64 / lane_bits; | 114 | 29.6k | constexpr uint64_t value_mask = (1ULL << BIT_WIDTH) - 1; | 115 | 29.6k | uint64_t mask = 0; | 116 | 148k | for (int lane = 0; lane < lanes; ++lane) { | 117 | 118k | mask |= value_mask << (lane * lane_bits); | 118 | 118k | } | 119 | 29.6k | return mask; | 120 | 29.6k | } |
|
121 | | |
122 | | template <int BIT_OFFSET, int PACKED_BITS> |
123 | 303k | static uint64_t load_packed_group(const uint8_t* input) { |
124 | 303k | constexpr int byte_offset = BIT_OFFSET / 8; |
125 | 303k | constexpr int shift = BIT_OFFSET % 8; |
126 | 303k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; |
127 | 303k | static_assert(PACKED_BITS <= 64); |
128 | 303k | static_assert(bytes_needed <= 9); |
129 | | |
130 | 303k | uint64_t low = 0; |
131 | 303k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); |
132 | 303k | if constexpr (bytes_needed <= 8) { |
133 | 303k | return low >> shift; |
134 | | } else { |
135 | | uint8_t high = input[byte_offset + 8]; |
136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> |
137 | | shift); |
138 | | } |
139 | 303k | } _ZN5doris10PdepUnpack17load_packed_groupILi0ELi8EEEmPKh Line | Count | Source | 123 | 404 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 404 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 404 | constexpr int shift = BIT_OFFSET % 8; | 126 | 404 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 404 | static_assert(PACKED_BITS <= 64); | 128 | 404 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 404 | uint64_t low = 0; | 131 | 404 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 404 | if constexpr (bytes_needed <= 8) { | 133 | 404 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 404 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi0ELi16EEEmPKh Line | Count | Source | 123 | 9.98k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 9.98k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 9.98k | constexpr int shift = BIT_OFFSET % 8; | 126 | 9.98k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 9.98k | static_assert(PACKED_BITS <= 64); | 128 | 9.98k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 9.98k | uint64_t low = 0; | 131 | 9.98k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 9.98k | if constexpr (bytes_needed <= 8) { | 133 | 9.98k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 9.98k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi0ELi24EEEmPKh Line | Count | Source | 123 | 54.4k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 54.4k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 54.4k | constexpr int shift = BIT_OFFSET % 8; | 126 | 54.4k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 54.4k | static_assert(PACKED_BITS <= 64); | 128 | 54.4k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 54.4k | uint64_t low = 0; | 131 | 54.4k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 54.4k | if constexpr (bytes_needed <= 8) { | 133 | 54.4k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 54.4k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi0ELi32EEEmPKh Line | Count | Source | 123 | 9.68k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 9.68k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 9.68k | constexpr int shift = BIT_OFFSET % 8; | 126 | 9.68k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 9.68k | static_assert(PACKED_BITS <= 64); | 128 | 9.68k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 9.68k | uint64_t low = 0; | 131 | 9.68k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 9.68k | if constexpr (bytes_needed <= 8) { | 133 | 9.68k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 9.68k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi0ELi40EEEmPKh Line | Count | Source | 123 | 24.1k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 24.1k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 24.1k | constexpr int shift = BIT_OFFSET % 8; | 126 | 24.1k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 24.1k | static_assert(PACKED_BITS <= 64); | 128 | 24.1k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 24.1k | uint64_t low = 0; | 131 | 24.1k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 24.1k | if constexpr (bytes_needed <= 8) { | 133 | 24.1k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 24.1k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi0ELi48EEEmPKh Line | Count | Source | 123 | 29.2k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 29.2k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 29.2k | constexpr int shift = BIT_OFFSET % 8; | 126 | 29.2k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 29.2k | static_assert(PACKED_BITS <= 64); | 128 | 29.2k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 29.2k | uint64_t low = 0; | 131 | 29.2k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 29.2k | if constexpr (bytes_needed <= 8) { | 133 | 29.2k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 29.2k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi0ELi56EEEmPKh Line | Count | Source | 123 | 38.2k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 38.2k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 38.2k | constexpr int shift = BIT_OFFSET % 8; | 126 | 38.2k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 38.2k | static_assert(PACKED_BITS <= 64); | 128 | 38.2k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 38.2k | uint64_t low = 0; | 131 | 38.2k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 38.2k | if constexpr (bytes_needed <= 8) { | 133 | 38.2k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 38.2k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi0ELi64EEEmPKh Line | Count | Source | 123 | 14.5k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 14.5k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 14.5k | constexpr int shift = BIT_OFFSET % 8; | 126 | 14.5k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 14.5k | static_assert(PACKED_BITS <= 64); | 128 | 14.5k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 14.5k | uint64_t low = 0; | 131 | 14.5k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 14.5k | if constexpr (bytes_needed <= 8) { | 133 | 14.5k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 14.5k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi0ELi36EEEmPKh Line | Count | Source | 123 | 3.74k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 3.74k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 3.74k | constexpr int shift = BIT_OFFSET % 8; | 126 | 3.74k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 3.74k | static_assert(PACKED_BITS <= 64); | 128 | 3.74k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 3.74k | uint64_t low = 0; | 131 | 3.74k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 3.74k | if constexpr (bytes_needed <= 8) { | 133 | 3.74k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 3.74k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi36ELi36EEEmPKh Line | Count | Source | 123 | 3.74k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 3.74k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 3.74k | constexpr int shift = BIT_OFFSET % 8; | 126 | 3.74k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 3.74k | static_assert(PACKED_BITS <= 64); | 128 | 3.74k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 3.74k | uint64_t low = 0; | 131 | 3.74k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 3.74k | if constexpr (bytes_needed <= 8) { | 133 | 3.74k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 3.74k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi40ELi40EEEmPKh Line | Count | Source | 123 | 7.73k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 7.73k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 7.73k | constexpr int shift = BIT_OFFSET % 8; | 126 | 7.73k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 7.73k | static_assert(PACKED_BITS <= 64); | 128 | 7.73k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 7.73k | uint64_t low = 0; | 131 | 7.73k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 7.73k | if constexpr (bytes_needed <= 8) { | 133 | 7.73k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 7.73k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi0ELi44EEEmPKh Line | Count | Source | 123 | 18.1k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 18.1k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 18.1k | constexpr int shift = BIT_OFFSET % 8; | 126 | 18.1k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 18.1k | static_assert(PACKED_BITS <= 64); | 128 | 18.1k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 18.1k | uint64_t low = 0; | 131 | 18.1k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 18.1k | if constexpr (bytes_needed <= 8) { | 133 | 18.1k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 18.1k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi44ELi44EEEmPKh Line | Count | Source | 123 | 18.1k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 18.1k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 18.1k | constexpr int shift = BIT_OFFSET % 8; | 126 | 18.1k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 18.1k | static_assert(PACKED_BITS <= 64); | 128 | 18.1k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 18.1k | uint64_t low = 0; | 131 | 18.1k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 18.1k | if constexpr (bytes_needed <= 8) { | 133 | 18.1k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 18.1k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi48ELi48EEEmPKh Line | Count | Source | 123 | 19.5k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 19.5k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 19.5k | constexpr int shift = BIT_OFFSET % 8; | 126 | 19.5k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 19.5k | static_assert(PACKED_BITS <= 64); | 128 | 19.5k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 19.5k | uint64_t low = 0; | 131 | 19.5k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 19.5k | if constexpr (bytes_needed <= 8) { | 133 | 19.5k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 19.5k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi0ELi52EEEmPKh Line | Count | Source | 123 | 2.14k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 2.14k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 2.14k | constexpr int shift = BIT_OFFSET % 8; | 126 | 2.14k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 2.14k | static_assert(PACKED_BITS <= 64); | 128 | 2.14k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 2.14k | uint64_t low = 0; | 131 | 2.14k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 2.14k | if constexpr (bytes_needed <= 8) { | 133 | 2.14k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 2.14k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi52ELi52EEEmPKh Line | Count | Source | 123 | 2.14k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 2.14k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 2.14k | constexpr int shift = BIT_OFFSET % 8; | 126 | 2.14k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 2.14k | static_assert(PACKED_BITS <= 64); | 128 | 2.14k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 2.14k | uint64_t low = 0; | 131 | 2.14k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 2.14k | if constexpr (bytes_needed <= 8) { | 133 | 2.14k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 2.14k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi56ELi56EEEmPKh Line | Count | Source | 123 | 17.1k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 17.1k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 17.1k | constexpr int shift = BIT_OFFSET % 8; | 126 | 17.1k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 17.1k | static_assert(PACKED_BITS <= 64); | 128 | 17.1k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 17.1k | uint64_t low = 0; | 131 | 17.1k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 17.1k | if constexpr (bytes_needed <= 8) { | 133 | 17.1k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 17.1k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi0ELi60EEEmPKh Line | Count | Source | 123 | 14.8k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 14.8k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 14.8k | constexpr int shift = BIT_OFFSET % 8; | 126 | 14.8k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 14.8k | static_assert(PACKED_BITS <= 64); | 128 | 14.8k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 14.8k | uint64_t low = 0; | 131 | 14.8k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 14.8k | if constexpr (bytes_needed <= 8) { | 133 | 14.8k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 14.8k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi60ELi60EEEmPKh Line | Count | Source | 123 | 14.8k | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 14.8k | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 14.8k | constexpr int shift = BIT_OFFSET % 8; | 126 | 14.8k | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 14.8k | static_assert(PACKED_BITS <= 64); | 128 | 14.8k | static_assert(bytes_needed <= 9); | 129 | | | 130 | 14.8k | uint64_t low = 0; | 131 | 14.8k | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 14.8k | if constexpr (bytes_needed <= 8) { | 133 | 14.8k | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 14.8k | } |
_ZN5doris10PdepUnpack17load_packed_groupILi24ELi8EEEmPKh Line | Count | Source | 123 | 172 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 172 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 172 | constexpr int shift = BIT_OFFSET % 8; | 126 | 172 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 172 | static_assert(PACKED_BITS <= 64); | 128 | 172 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 172 | uint64_t low = 0; | 131 | 172 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 172 | if constexpr (bytes_needed <= 8) { | 133 | 172 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 172 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi16ELi8EEEmPKh Line | Count | Source | 123 | 172 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 172 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 172 | constexpr int shift = BIT_OFFSET % 8; | 126 | 172 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 172 | static_assert(PACKED_BITS <= 64); | 128 | 172 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 172 | uint64_t low = 0; | 131 | 172 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 172 | if constexpr (bytes_needed <= 8) { | 133 | 172 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 172 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi8ELi8EEEmPKh Line | Count | Source | 123 | 196 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 196 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 196 | constexpr int shift = BIT_OFFSET % 8; | 126 | 196 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 196 | static_assert(PACKED_BITS <= 64); | 128 | 196 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 196 | uint64_t low = 0; | 131 | 196 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 196 | if constexpr (bytes_needed <= 8) { | 133 | 196 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 196 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi48ELi16EEEmPKh Line | Count | Source | 123 | 12 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 12 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 12 | constexpr int shift = BIT_OFFSET % 8; | 126 | 12 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 12 | static_assert(PACKED_BITS <= 64); | 128 | 12 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 12 | uint64_t low = 0; | 131 | 12 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 12 | if constexpr (bytes_needed <= 8) { | 133 | 12 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 12 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi32ELi16EEEmPKh Line | Count | Source | 123 | 12 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 12 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 12 | constexpr int shift = BIT_OFFSET % 8; | 126 | 12 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 12 | static_assert(PACKED_BITS <= 64); | 128 | 12 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 12 | uint64_t low = 0; | 131 | 12 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 12 | if constexpr (bytes_needed <= 8) { | 133 | 12 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 12 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi16ELi16EEEmPKh Line | Count | Source | 123 | 36 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 36 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 36 | constexpr int shift = BIT_OFFSET % 8; | 126 | 36 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 36 | static_assert(PACKED_BITS <= 64); | 128 | 36 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 36 | uint64_t low = 0; | 131 | 36 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 36 | if constexpr (bytes_needed <= 8) { | 133 | 36 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 36 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi72ELi24EEEmPKh Line | Count | Source | 123 | 12 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 12 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 12 | constexpr int shift = BIT_OFFSET % 8; | 126 | 12 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 12 | static_assert(PACKED_BITS <= 64); | 128 | 12 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 12 | uint64_t low = 0; | 131 | 12 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 12 | if constexpr (bytes_needed <= 8) { | 133 | 12 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 12 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi48ELi24EEEmPKh Line | Count | Source | 123 | 12 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 12 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 12 | constexpr int shift = BIT_OFFSET % 8; | 126 | 12 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 12 | static_assert(PACKED_BITS <= 64); | 128 | 12 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 12 | uint64_t low = 0; | 131 | 12 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 12 | if constexpr (bytes_needed <= 8) { | 133 | 12 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 12 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi24ELi24EEEmPKh Line | Count | Source | 123 | 36 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 36 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 36 | constexpr int shift = BIT_OFFSET % 8; | 126 | 36 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 36 | static_assert(PACKED_BITS <= 64); | 128 | 36 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 36 | uint64_t low = 0; | 131 | 36 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 36 | if constexpr (bytes_needed <= 8) { | 133 | 36 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 36 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi96ELi32EEEmPKh Line | Count | Source | 123 | 12 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 12 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 12 | constexpr int shift = BIT_OFFSET % 8; | 126 | 12 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 12 | static_assert(PACKED_BITS <= 64); | 128 | 12 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 12 | uint64_t low = 0; | 131 | 12 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 12 | if constexpr (bytes_needed <= 8) { | 133 | 12 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 12 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi64ELi32EEEmPKh Line | Count | Source | 123 | 12 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 12 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 12 | constexpr int shift = BIT_OFFSET % 8; | 126 | 12 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 12 | static_assert(PACKED_BITS <= 64); | 128 | 12 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 12 | uint64_t low = 0; | 131 | 12 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 12 | if constexpr (bytes_needed <= 8) { | 133 | 12 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 12 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi32ELi32EEEmPKh Line | Count | Source | 123 | 36 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 36 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 36 | constexpr int shift = BIT_OFFSET % 8; | 126 | 36 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 36 | static_assert(PACKED_BITS <= 64); | 128 | 36 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 36 | uint64_t low = 0; | 131 | 36 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 36 | if constexpr (bytes_needed <= 8) { | 133 | 36 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 36 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi120ELi40EEEmPKh Line | Count | Source | 123 | 24 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 24 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 24 | constexpr int shift = BIT_OFFSET % 8; | 126 | 24 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 24 | static_assert(PACKED_BITS <= 64); | 128 | 24 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 24 | uint64_t low = 0; | 131 | 24 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 24 | if constexpr (bytes_needed <= 8) { | 133 | 24 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 24 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi80ELi40EEEmPKh Line | Count | Source | 123 | 24 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 24 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 24 | constexpr int shift = BIT_OFFSET % 8; | 126 | 24 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 24 | static_assert(PACKED_BITS <= 64); | 128 | 24 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 24 | uint64_t low = 0; | 131 | 24 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 24 | if constexpr (bytes_needed <= 8) { | 133 | 24 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 24 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi144ELi48EEEmPKh Line | Count | Source | 123 | 24 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 24 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 24 | constexpr int shift = BIT_OFFSET % 8; | 126 | 24 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 24 | static_assert(PACKED_BITS <= 64); | 128 | 24 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 24 | uint64_t low = 0; | 131 | 24 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 24 | if constexpr (bytes_needed <= 8) { | 133 | 24 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 24 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi96ELi48EEEmPKh Line | Count | Source | 123 | 24 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 24 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 24 | constexpr int shift = BIT_OFFSET % 8; | 126 | 24 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 24 | static_assert(PACKED_BITS <= 64); | 128 | 24 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 24 | uint64_t low = 0; | 131 | 24 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 24 | if constexpr (bytes_needed <= 8) { | 133 | 24 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 24 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi168ELi56EEEmPKh Line | Count | Source | 123 | 24 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 24 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 24 | constexpr int shift = BIT_OFFSET % 8; | 126 | 24 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 24 | static_assert(PACKED_BITS <= 64); | 128 | 24 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 24 | uint64_t low = 0; | 131 | 24 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 24 | if constexpr (bytes_needed <= 8) { | 133 | 24 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 24 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi112ELi56EEEmPKh Line | Count | Source | 123 | 24 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 24 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 24 | constexpr int shift = BIT_OFFSET % 8; | 126 | 24 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 24 | static_assert(PACKED_BITS <= 64); | 128 | 24 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 24 | uint64_t low = 0; | 131 | 24 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 24 | if constexpr (bytes_needed <= 8) { | 133 | 24 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 24 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi192ELi64EEEmPKh Line | Count | Source | 123 | 12 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 12 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 12 | constexpr int shift = BIT_OFFSET % 8; | 126 | 12 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 12 | static_assert(PACKED_BITS <= 64); | 128 | 12 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 12 | uint64_t low = 0; | 131 | 12 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 12 | if constexpr (bytes_needed <= 8) { | 133 | 12 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 12 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi128ELi64EEEmPKh Line | Count | Source | 123 | 12 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 12 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 12 | constexpr int shift = BIT_OFFSET % 8; | 126 | 12 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 12 | static_assert(PACKED_BITS <= 64); | 128 | 12 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 12 | uint64_t low = 0; | 131 | 12 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 12 | if constexpr (bytes_needed <= 8) { | 133 | 12 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 12 | } |
_ZN5doris10PdepUnpack17load_packed_groupILi64ELi64EEEmPKh Line | Count | Source | 123 | 36 | static uint64_t load_packed_group(const uint8_t* input) { | 124 | 36 | constexpr int byte_offset = BIT_OFFSET / 8; | 125 | 36 | constexpr int shift = BIT_OFFSET % 8; | 126 | 36 | constexpr int bytes_needed = (shift + PACKED_BITS + 7) / 8; | 127 | 36 | static_assert(PACKED_BITS <= 64); | 128 | 36 | static_assert(bytes_needed <= 9); | 129 | | | 130 | 36 | uint64_t low = 0; | 131 | 36 | std::memcpy(&low, input + byte_offset, bytes_needed < 8 ? bytes_needed : 8); | 132 | 36 | if constexpr (bytes_needed <= 8) { | 133 | 36 | return low >> shift; | 134 | | } else { | 135 | | uint8_t high = input[byte_offset + 8]; | 136 | | return static_cast<uint64_t>((static_cast<unsigned __int128>(high) << 64 | low) >> | 137 | | shift); | 138 | | } | 139 | 36 | } |
|
140 | | |
141 | | template <typename T, int BIT_WIDTH, std::size_t GROUP> |
142 | 1.02k | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { |
143 | 1.02k | constexpr int lanes = 64 / (sizeof(T) * 8); |
144 | 1.02k | constexpr int first_value = GROUP * lanes; |
145 | 1.02k | constexpr int bit_offset = first_value * BIT_WIDTH; |
146 | 1.02k | constexpr int packed_bits = lanes * BIT_WIDTH; |
147 | 1.02k | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); |
148 | 1.02k | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); |
149 | 1.02k | std::memcpy(output + first_value, &expanded, sizeof(expanded)); |
150 | 1.02k | } _ZN5doris10PdepUnpack12unpack_groupIhLi1ELm3EEEvPKhPT_ Line | Count | Source | 142 | 172 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 172 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 172 | constexpr int first_value = GROUP * lanes; | 145 | 172 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 172 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 172 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 172 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 172 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 172 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi1ELm2EEEvPKhPT_ Line | Count | Source | 142 | 172 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 172 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 172 | constexpr int first_value = GROUP * lanes; | 145 | 172 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 172 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 172 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 172 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 172 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 172 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi1ELm1EEEvPKhPT_ Line | Count | Source | 142 | 172 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 172 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 172 | constexpr int first_value = GROUP * lanes; | 145 | 172 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 172 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 172 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 172 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 172 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 172 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi1ELm0EEEvPKhPT_ Line | Count | Source | 142 | 172 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 172 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 172 | constexpr int first_value = GROUP * lanes; | 145 | 172 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 172 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 172 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 172 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 172 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 172 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi2ELm3EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi2ELm2EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi2ELm1EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi2ELm0EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi3ELm3EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi3ELm2EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi3ELm1EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi3ELm0EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi4ELm3EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi4ELm2EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi4ELm1EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi4ELm0EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi5ELm3EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi5ELm2EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi5ELm1EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi5ELm0EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi6ELm3EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi6ELm2EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi6ELm1EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi6ELm0EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi7ELm3EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi7ELm2EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi7ELm1EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi7ELm0EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi8ELm3EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi8ELm2EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi8ELm1EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
_ZN5doris10PdepUnpack12unpack_groupIhLi8ELm0EEEvPKhPT_ Line | Count | Source | 142 | 12 | __attribute__((target("bmi2"))) static void unpack_group(const uint8_t* input, T* output) { | 143 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 144 | 12 | constexpr int first_value = GROUP * lanes; | 145 | 12 | constexpr int bit_offset = first_value * BIT_WIDTH; | 146 | 12 | constexpr int packed_bits = lanes * BIT_WIDTH; | 147 | 12 | uint64_t packed = load_packed_group<bit_offset, packed_bits>(input); | 148 | 12 | uint64_t expanded = _pdep_u64(packed, pdep_mask<T, BIT_WIDTH>()); | 149 | 12 | std::memcpy(output + first_value, &expanded, sizeof(expanded)); | 150 | 12 | } |
|
151 | | |
152 | | template <typename T, int BIT_WIDTH, std::size_t... GROUPS> |
153 | | __attribute__((target("bmi2"))) static void unpack32_with_pdep_impl( |
154 | 256 | const uint8_t* input, T* output, std::index_sequence<GROUPS...>) { |
155 | 256 | (unpack_group<T, BIT_WIDTH, GROUPS>(input, output), ...); |
156 | 256 | } _ZN5doris10PdepUnpack23unpack32_with_pdep_implIhLi1EJLm0ELm1ELm2ELm3EEEEvPKhPT_St16integer_sequenceImJXspT1_EEE Line | Count | Source | 154 | 172 | const uint8_t* input, T* output, std::index_sequence<GROUPS...>) { | 155 | 172 | (unpack_group<T, BIT_WIDTH, GROUPS>(input, output), ...); | 156 | 172 | } |
_ZN5doris10PdepUnpack23unpack32_with_pdep_implIhLi2EJLm0ELm1ELm2ELm3EEEEvPKhPT_St16integer_sequenceImJXspT1_EEE Line | Count | Source | 154 | 12 | const uint8_t* input, T* output, std::index_sequence<GROUPS...>) { | 155 | 12 | (unpack_group<T, BIT_WIDTH, GROUPS>(input, output), ...); | 156 | 12 | } |
_ZN5doris10PdepUnpack23unpack32_with_pdep_implIhLi3EJLm0ELm1ELm2ELm3EEEEvPKhPT_St16integer_sequenceImJXspT1_EEE Line | Count | Source | 154 | 12 | const uint8_t* input, T* output, std::index_sequence<GROUPS...>) { | 155 | 12 | (unpack_group<T, BIT_WIDTH, GROUPS>(input, output), ...); | 156 | 12 | } |
_ZN5doris10PdepUnpack23unpack32_with_pdep_implIhLi4EJLm0ELm1ELm2ELm3EEEEvPKhPT_St16integer_sequenceImJXspT1_EEE Line | Count | Source | 154 | 12 | const uint8_t* input, T* output, std::index_sequence<GROUPS...>) { | 155 | 12 | (unpack_group<T, BIT_WIDTH, GROUPS>(input, output), ...); | 156 | 12 | } |
_ZN5doris10PdepUnpack23unpack32_with_pdep_implIhLi5EJLm0ELm1ELm2ELm3EEEEvPKhPT_St16integer_sequenceImJXspT1_EEE Line | Count | Source | 154 | 12 | const uint8_t* input, T* output, std::index_sequence<GROUPS...>) { | 155 | 12 | (unpack_group<T, BIT_WIDTH, GROUPS>(input, output), ...); | 156 | 12 | } |
_ZN5doris10PdepUnpack23unpack32_with_pdep_implIhLi6EJLm0ELm1ELm2ELm3EEEEvPKhPT_St16integer_sequenceImJXspT1_EEE Line | Count | Source | 154 | 12 | const uint8_t* input, T* output, std::index_sequence<GROUPS...>) { | 155 | 12 | (unpack_group<T, BIT_WIDTH, GROUPS>(input, output), ...); | 156 | 12 | } |
_ZN5doris10PdepUnpack23unpack32_with_pdep_implIhLi7EJLm0ELm1ELm2ELm3EEEEvPKhPT_St16integer_sequenceImJXspT1_EEE Line | Count | Source | 154 | 12 | const uint8_t* input, T* output, std::index_sequence<GROUPS...>) { | 155 | 12 | (unpack_group<T, BIT_WIDTH, GROUPS>(input, output), ...); | 156 | 12 | } |
_ZN5doris10PdepUnpack23unpack32_with_pdep_implIhLi8EJLm0ELm1ELm2ELm3EEEEvPKhPT_St16integer_sequenceImJXspT1_EEE Line | Count | Source | 154 | 12 | const uint8_t* input, T* output, std::index_sequence<GROUPS...>) { | 155 | 12 | (unpack_group<T, BIT_WIDTH, GROUPS>(input, output), ...); | 156 | 12 | } |
|
157 | | |
158 | | template <typename T, int BIT_WIDTH> |
159 | | __attribute__((target("bmi2"))) static void unpack32_with_pdep(const uint8_t* input, |
160 | 256 | T* output) { |
161 | 256 | constexpr int lanes = 64 / (sizeof(T) * 8); |
162 | 256 | unpack32_with_pdep_impl<T, BIT_WIDTH>(input, output, |
163 | 256 | std::make_index_sequence<32 / lanes> {}); |
164 | 256 | } _ZN5doris10PdepUnpack18unpack32_with_pdepIhLi1EEEvPKhPT_ Line | Count | Source | 160 | 172 | T* output) { | 161 | 172 | constexpr int lanes = 64 / (sizeof(T) * 8); | 162 | 172 | unpack32_with_pdep_impl<T, BIT_WIDTH>(input, output, | 163 | 172 | std::make_index_sequence<32 / lanes> {}); | 164 | 172 | } |
_ZN5doris10PdepUnpack18unpack32_with_pdepIhLi2EEEvPKhPT_ Line | Count | Source | 160 | 12 | T* output) { | 161 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 162 | 12 | unpack32_with_pdep_impl<T, BIT_WIDTH>(input, output, | 163 | 12 | std::make_index_sequence<32 / lanes> {}); | 164 | 12 | } |
_ZN5doris10PdepUnpack18unpack32_with_pdepIhLi3EEEvPKhPT_ Line | Count | Source | 160 | 12 | T* output) { | 161 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 162 | 12 | unpack32_with_pdep_impl<T, BIT_WIDTH>(input, output, | 163 | 12 | std::make_index_sequence<32 / lanes> {}); | 164 | 12 | } |
_ZN5doris10PdepUnpack18unpack32_with_pdepIhLi4EEEvPKhPT_ Line | Count | Source | 160 | 12 | T* output) { | 161 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 162 | 12 | unpack32_with_pdep_impl<T, BIT_WIDTH>(input, output, | 163 | 12 | std::make_index_sequence<32 / lanes> {}); | 164 | 12 | } |
_ZN5doris10PdepUnpack18unpack32_with_pdepIhLi5EEEvPKhPT_ Line | Count | Source | 160 | 12 | T* output) { | 161 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 162 | 12 | unpack32_with_pdep_impl<T, BIT_WIDTH>(input, output, | 163 | 12 | std::make_index_sequence<32 / lanes> {}); | 164 | 12 | } |
_ZN5doris10PdepUnpack18unpack32_with_pdepIhLi6EEEvPKhPT_ Line | Count | Source | 160 | 12 | T* output) { | 161 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 162 | 12 | unpack32_with_pdep_impl<T, BIT_WIDTH>(input, output, | 163 | 12 | std::make_index_sequence<32 / lanes> {}); | 164 | 12 | } |
_ZN5doris10PdepUnpack18unpack32_with_pdepIhLi7EEEvPKhPT_ Line | Count | Source | 160 | 12 | T* output) { | 161 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 162 | 12 | unpack32_with_pdep_impl<T, BIT_WIDTH>(input, output, | 163 | 12 | std::make_index_sequence<32 / lanes> {}); | 164 | 12 | } |
_ZN5doris10PdepUnpack18unpack32_with_pdepIhLi8EEEvPKhPT_ Line | Count | Source | 160 | 12 | T* output) { | 161 | 12 | constexpr int lanes = 64 / (sizeof(T) * 8); | 162 | 12 | unpack32_with_pdep_impl<T, BIT_WIDTH>(input, output, | 163 | 12 | std::make_index_sequence<32 / lanes> {}); | 164 | 12 | } |
|
165 | | }; |
166 | | |
167 | | } // namespace doris |
168 | | |
169 | | #endif |