Vector Optimized Library of Kernels 3.1.0
Architecture-tuned implementations of math kernels
volk_32u_byteswappuppet_32u.h
Go to the documentation of this file.
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>
16
17#ifdef LV_HAVE_GENERIC
18static inline void volk_32u_byteswappuppet_32u_generic(uint32_t* output,
19 uint32_t* intsToSwap,
20 unsigned int num_points)
21{
22
23 volk_32u_byteswap_generic((uint32_t*)intsToSwap, num_points);
24 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t));
25}
26#endif
27
28#ifdef LV_HAVE_NEON
29static 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
40static 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
51static inline void volk_32u_byteswappuppet_32u_u_sse2(uint32_t* output,
52 uint32_t* intsToSwap,
53 unsigned int num_points)
54{
55
56 volk_32u_byteswap_u_sse2((uint32_t*)intsToSwap, num_points);
57 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t));
58}
59#endif
60
61#ifdef LV_HAVE_SSE2
62static inline void volk_32u_byteswappuppet_32u_a_sse2(uint32_t* output,
63 uint32_t* intsToSwap,
64 unsigned int num_points)
65{
66
67 volk_32u_byteswap_a_sse2((uint32_t*)intsToSwap, num_points);
68 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t));
69}
70#endif
71
72#ifdef LV_HAVE_AVX2
73static inline void volk_32u_byteswappuppet_32u_u_avx2(uint32_t* output,
74 uint32_t* intsToSwap,
75 unsigned int num_points)
76{
77
78 volk_32u_byteswap_u_avx2((uint32_t*)intsToSwap, num_points);
79 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t));
80}
81#endif
82
83#ifdef LV_HAVE_AVX2
84static inline void volk_32u_byteswappuppet_32u_a_avx2(uint32_t* output,
85 uint32_t* intsToSwap,
86 unsigned int num_points)
87{
88
89 volk_32u_byteswap_a_avx2((uint32_t*)intsToSwap, num_points);
90 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint32_t));
91}
92#endif
93
94#endif