1
1
#ifndef XSS_KEYVALUE_NETWORKS
2
2
#define XSS_KEYVALUE_NETWORKS
3
3
4
- <<<<<<< HEAD
5
- #include " avx512-32bit-qsort.hpp"
6
- #include " avx512-64bit-qsort.hpp"
7
- #include " avx2-64bit-qsort.hpp"
8
- =======
9
4
#include " xss-common-includes.h"
10
5
11
- template <int num_lanes>
12
- struct index_64bit_vector_type ;
13
- template <>
14
- struct index_64bit_vector_type <8 > {
15
- using type = zmm_vector<uint64_t >;
16
- };
17
- template <>
18
- struct index_64bit_vector_type <4 > {
19
- using type = avx2_vector<uint64_t >;
20
- };
6
+ #define NETWORK_32BIT_1 14 , 15 , 12 , 13 , 10 , 11 , 8 , 9 , 6 , 7 , 4 , 5 , 2 , 3 , 0 , 1
7
+ #define NETWORK_32BIT_3 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7
8
+ #define NETWORK_32BIT_5 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15
9
+ #define NETWORK_32BIT_6 11 , 10 , 9 , 8 , 15 , 14 , 13 , 12 , 3 , 2 , 1 , 0 , 7 , 6 , 5 , 4
10
+ #define NETWORK_32BIT_7 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 , 15 , 14 , 13 , 12 , 11 , 10 , 9 , 8
21
11
22
12
template <typename keyType, typename valueType>
23
13
typename valueType::opmask_t extend_mask (typename keyType::opmask_t mask)
@@ -44,10 +34,9 @@ typename valueType::opmask_t extend_mask(typename keyType::opmask_t mask)
44
34
}
45
35
else {
46
36
static_assert (keyType::vec_type == simd_type::AVX512,
47
- " Should not reach here" );
37
+ " should not reach here" );
48
38
}
49
39
}
50
- >>>>>>> d1e90bb (Support for AVX2 argsort/argselect)
51
40
52
41
template <typename vtype1,
53
42
typename vtype2,
@@ -354,17 +343,13 @@ bitonic_merge_dispatch(typename keyType::reg_t &key,
354
343
{
355
344
constexpr int numlanes = keyType::numlanes;
356
345
if constexpr (numlanes == 8 ) {
357
- <<<<<<< HEAD
358
346
key = bitonic_merge_reg_8lanes<keyType, valueType>(key, value);
359
347
}
360
348
else if constexpr (numlanes == 16 ) {
361
349
key = bitonic_merge_reg_16lanes<keyType, valueType>(key, value);
362
- =======
363
- key = bitonic_merge_zmm_64bit<keyType, valueType>(key, value);
364
350
}
365
351
else if constexpr (numlanes == 4 ) {
366
352
key = bitonic_merge_ymm_64bit<keyType, valueType>(key, value);
367
- >>>>>>> d1e90bb (Support for AVX2 argsort/argselect)
368
353
}
369
354
else {
370
355
static_assert (numlanes == -1 , " No implementation" );
@@ -379,17 +364,13 @@ X86_SIMD_SORT_INLINE void sort_vec_dispatch(typename keyType::reg_t &key,
379
364
{
380
365
constexpr int numlanes = keyType::numlanes;
381
366
if constexpr (numlanes == 8 ) {
382
- <<<<<<< HEAD
383
367
key = sort_reg_8lanes<keyType, valueType>(key, value);
384
368
}
385
369
else if constexpr (numlanes == 16 ) {
386
370
key = sort_reg_16lanes<keyType, valueType>(key, value);
387
- =======
388
- key = sort_zmm_64bit<keyType, valueType>(key, value);
389
371
}
390
372
else if constexpr (numlanes == 4 ) {
391
373
key = sort_ymm_64bit<keyType, valueType>(key, value);
392
- >>>>>>> d1e90bb (Support for AVX2 argsort/argselect)
393
374
}
394
375
else {
395
376
static_assert (numlanes == -1 , " No implementation" );
0 commit comments