Line |
Branch |
Exec |
Source |
1 |
|
|
/* -*- c++ -*- */ |
2 |
|
|
/* |
3 |
|
|
* Copyright 2014, 2015, 2018, 2020 Free Software Foundation, Inc. |
4 |
|
|
* |
5 |
|
|
* This file is part of VOLK |
6 |
|
|
* |
7 |
|
|
* SPDX-License-Identifier: LGPL-3.0-or-later |
8 |
|
|
*/ |
9 |
|
|
|
10 |
|
|
#ifndef INCLUDED_volk_64u_byteswappuppet_64u_H |
11 |
|
|
#define INCLUDED_volk_64u_byteswappuppet_64u_H |
12 |
|
|
|
13 |
|
|
|
14 |
|
|
#include <stdint.h> |
15 |
|
|
#include <string.h> |
16 |
|
|
#include <volk/volk_64u_byteswap.h> |
17 |
|
|
|
18 |
|
|
#ifdef LV_HAVE_GENERIC |
19 |
|
2 |
static inline void volk_64u_byteswappuppet_64u_generic(uint64_t* output, |
20 |
|
|
uint64_t* intsToSwap, |
21 |
|
|
unsigned int num_points) |
22 |
|
|
{ |
23 |
|
|
|
24 |
|
2 |
volk_64u_byteswap_generic((uint64_t*)intsToSwap, num_points); |
25 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint64_t)); |
26 |
|
2 |
} |
27 |
|
|
#endif |
28 |
|
|
|
29 |
|
|
#ifdef LV_HAVE_NEONV8 |
30 |
|
|
static inline void volk_64u_byteswappuppet_64u_neonv8(uint64_t* output, |
31 |
|
|
uint64_t* intsToSwap, |
32 |
|
|
unsigned int num_points) |
33 |
|
|
{ |
34 |
|
|
|
35 |
|
|
volk_64u_byteswap_neonv8((uint64_t*)intsToSwap, num_points); |
36 |
|
|
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint64_t)); |
37 |
|
|
} |
38 |
|
|
#else |
39 |
|
|
#ifdef LV_HAVE_NEON |
40 |
|
|
static inline void volk_64u_byteswappuppet_64u_neon(uint64_t* output, |
41 |
|
|
uint64_t* intsToSwap, |
42 |
|
|
unsigned int num_points) |
43 |
|
|
{ |
44 |
|
|
|
45 |
|
|
volk_64u_byteswap_neon((uint64_t*)intsToSwap, num_points); |
46 |
|
|
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint64_t)); |
47 |
|
|
} |
48 |
|
|
#endif |
49 |
|
|
#endif |
50 |
|
|
|
51 |
|
|
#ifdef LV_HAVE_SSE2 |
52 |
|
2 |
static inline void volk_64u_byteswappuppet_64u_u_sse2(uint64_t* output, |
53 |
|
|
uint64_t* intsToSwap, |
54 |
|
|
unsigned int num_points) |
55 |
|
|
{ |
56 |
|
|
|
57 |
|
2 |
volk_64u_byteswap_u_sse2((uint64_t*)intsToSwap, num_points); |
58 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint64_t)); |
59 |
|
2 |
} |
60 |
|
|
#endif |
61 |
|
|
|
62 |
|
|
#ifdef LV_HAVE_SSE2 |
63 |
|
2 |
static inline void volk_64u_byteswappuppet_64u_a_sse2(uint64_t* output, |
64 |
|
|
uint64_t* intsToSwap, |
65 |
|
|
unsigned int num_points) |
66 |
|
|
{ |
67 |
|
|
|
68 |
|
2 |
volk_64u_byteswap_a_sse2((uint64_t*)intsToSwap, num_points); |
69 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint64_t)); |
70 |
|
2 |
} |
71 |
|
|
#endif |
72 |
|
|
|
73 |
|
|
#ifdef LV_HAVE_SSSE3 |
74 |
|
2 |
static inline void volk_64u_byteswappuppet_64u_u_ssse3(uint64_t* output, |
75 |
|
|
uint64_t* intsToSwap, |
76 |
|
|
unsigned int num_points) |
77 |
|
|
{ |
78 |
|
|
|
79 |
|
2 |
volk_64u_byteswap_u_ssse3((uint64_t*)intsToSwap, num_points); |
80 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint64_t)); |
81 |
|
2 |
} |
82 |
|
|
#endif |
83 |
|
|
|
84 |
|
|
#ifdef LV_HAVE_SSSE3 |
85 |
|
2 |
static inline void volk_64u_byteswappuppet_64u_a_ssse3(uint64_t* output, |
86 |
|
|
uint64_t* intsToSwap, |
87 |
|
|
unsigned int num_points) |
88 |
|
|
{ |
89 |
|
|
|
90 |
|
2 |
volk_64u_byteswap_a_ssse3((uint64_t*)intsToSwap, num_points); |
91 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint64_t)); |
92 |
|
2 |
} |
93 |
|
|
#endif |
94 |
|
|
|
95 |
|
|
#ifdef LV_HAVE_AVX2 |
96 |
|
2 |
static inline void volk_64u_byteswappuppet_64u_u_avx2(uint64_t* output, |
97 |
|
|
uint64_t* intsToSwap, |
98 |
|
|
unsigned int num_points) |
99 |
|
|
{ |
100 |
|
|
|
101 |
|
2 |
volk_64u_byteswap_u_avx2((uint64_t*)intsToSwap, num_points); |
102 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint64_t)); |
103 |
|
2 |
} |
104 |
|
|
#endif |
105 |
|
|
|
106 |
|
|
#ifdef LV_HAVE_AVX2 |
107 |
|
2 |
static inline void volk_64u_byteswappuppet_64u_a_avx2(uint64_t* output, |
108 |
|
|
uint64_t* intsToSwap, |
109 |
|
|
unsigned int num_points) |
110 |
|
|
{ |
111 |
|
|
|
112 |
|
2 |
volk_64u_byteswap_a_avx2((uint64_t*)intsToSwap, num_points); |
113 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint64_t)); |
114 |
|
2 |
} |
115 |
|
|
#endif |
116 |
|
|
|
117 |
|
|
#endif |
118 |
|
|
|