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_32u_byteswappuppet_32u_H |
11 |
|
|
#define INCLUDED_volk_32u_byteswappuppet_32u_H |
12 |
|
|
|
13 |
|
|
#include <stdint.h> |
14 |
|
|
#include <string.h> |
15 |
|
|
#include <volk/volk_32u_byteswap.h> |
16 |
|
|
|
17 |
|
|
#ifdef LV_HAVE_GENERIC |
18 |
|
2 |
static inline void volk_32u_byteswappuppet_32u_generic(uint32_t* output, |
19 |
|
|
uint32_t* intsToSwap, |
20 |
|
|
unsigned int num_points) |
21 |
|
|
{ |
22 |
|
|
|
23 |
|
2 |
volk_32u_byteswap_generic((uint32_t*)intsToSwap, num_points); |
24 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t)); |
25 |
|
2 |
} |
26 |
|
|
#endif |
27 |
|
|
|
28 |
|
|
#ifdef LV_HAVE_NEON |
29 |
|
|
static inline void volk_32u_byteswappuppet_32u_neon(uint32_t* output, |
30 |
|
|
uint32_t* intsToSwap, |
31 |
|
|
unsigned int num_points) |
32 |
|
|
{ |
33 |
|
|
|
34 |
|
|
volk_32u_byteswap_neon((uint32_t*)intsToSwap, num_points); |
35 |
|
|
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t)); |
36 |
|
|
} |
37 |
|
|
#endif |
38 |
|
|
|
39 |
|
|
#ifdef LV_HAVE_NEONV8 |
40 |
|
|
static inline void volk_32u_byteswappuppet_32u_neonv8(uint32_t* output, |
41 |
|
|
uint32_t* intsToSwap, |
42 |
|
|
unsigned int num_points) |
43 |
|
|
{ |
44 |
|
|
|
45 |
|
|
volk_32u_byteswap_neonv8((uint32_t*)intsToSwap, num_points); |
46 |
|
|
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t)); |
47 |
|
|
} |
48 |
|
|
#endif |
49 |
|
|
|
50 |
|
|
#ifdef LV_HAVE_SSE2 |
51 |
|
2 |
static inline void volk_32u_byteswappuppet_32u_u_sse2(uint32_t* output, |
52 |
|
|
uint32_t* intsToSwap, |
53 |
|
|
unsigned int num_points) |
54 |
|
|
{ |
55 |
|
|
|
56 |
|
2 |
volk_32u_byteswap_u_sse2((uint32_t*)intsToSwap, num_points); |
57 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t)); |
58 |
|
2 |
} |
59 |
|
|
#endif |
60 |
|
|
|
61 |
|
|
#ifdef LV_HAVE_SSE2 |
62 |
|
2 |
static inline void volk_32u_byteswappuppet_32u_a_sse2(uint32_t* output, |
63 |
|
|
uint32_t* intsToSwap, |
64 |
|
|
unsigned int num_points) |
65 |
|
|
{ |
66 |
|
|
|
67 |
|
2 |
volk_32u_byteswap_a_sse2((uint32_t*)intsToSwap, num_points); |
68 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t)); |
69 |
|
2 |
} |
70 |
|
|
#endif |
71 |
|
|
|
72 |
|
|
#ifdef LV_HAVE_AVX2 |
73 |
|
2 |
static inline void volk_32u_byteswappuppet_32u_u_avx2(uint32_t* output, |
74 |
|
|
uint32_t* intsToSwap, |
75 |
|
|
unsigned int num_points) |
76 |
|
|
{ |
77 |
|
|
|
78 |
|
2 |
volk_32u_byteswap_u_avx2((uint32_t*)intsToSwap, num_points); |
79 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t)); |
80 |
|
2 |
} |
81 |
|
|
#endif |
82 |
|
|
|
83 |
|
|
#ifdef LV_HAVE_AVX2 |
84 |
|
2 |
static inline void volk_32u_byteswappuppet_32u_a_avx2(uint32_t* output, |
85 |
|
|
uint32_t* intsToSwap, |
86 |
|
|
unsigned int num_points) |
87 |
|
|
{ |
88 |
|
|
|
89 |
|
2 |
volk_32u_byteswap_a_avx2((uint32_t*)intsToSwap, num_points); |
90 |
|
2 |
memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t)); |
91 |
|
2 |
} |
92 |
|
|
#endif |
93 |
|
|
|
94 |
|
|
#endif |
95 |
|
|
|