GCC Code Coverage Report


Directory: ./
File: kernels/volk/volk_16u_byteswappuppet_16u.h
Date: 2023-10-23 23:10:04
Exec Total Coverage
Lines: 20 20 100.0%
Functions: 5 5 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /* -*- c++ -*- */
2 /*
3 * Copyright 2014, 2015, 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_16u_byteswappuppet_16u_H
11 #define INCLUDED_volk_16u_byteswappuppet_16u_H
12
13
14 #include <stdint.h>
15 #include <string.h>
16 #include <volk/volk_16u_byteswap.h>
17
18 #ifdef LV_HAVE_GENERIC
19 2 static inline void volk_16u_byteswappuppet_16u_generic(uint16_t* output,
20 uint16_t* intsToSwap,
21 unsigned int num_points)
22 {
23
24 2 volk_16u_byteswap_generic((uint16_t*)intsToSwap, num_points);
25 2 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint16_t));
26 2 }
27 #endif
28
29 #ifdef LV_HAVE_NEON
30 static inline void volk_16u_byteswappuppet_16u_neon(uint16_t* output,
31 uint16_t* intsToSwap,
32 unsigned int num_points)
33 {
34
35 volk_16u_byteswap_neon((uint16_t*)intsToSwap, num_points);
36 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint16_t));
37 }
38 #endif
39
40 #ifdef LV_HAVE_NEON
41 static inline void volk_16u_byteswappuppet_16u_neon_table(uint16_t* output,
42 uint16_t* intsToSwap,
43 unsigned int num_points)
44 {
45
46 volk_16u_byteswap_neon_table((uint16_t*)intsToSwap, num_points);
47 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint16_t));
48 }
49 #endif
50
51 #ifdef LV_HAVE_SSE2
52 2 static inline void volk_16u_byteswappuppet_16u_u_sse2(uint16_t* output,
53 uint16_t* intsToSwap,
54 unsigned int num_points)
55 {
56
57 2 volk_16u_byteswap_u_sse2((uint16_t*)intsToSwap, num_points);
58 2 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint16_t));
59 2 }
60 #endif
61
62 #ifdef LV_HAVE_SSE2
63 2 static inline void volk_16u_byteswappuppet_16u_a_sse2(uint16_t* output,
64 uint16_t* intsToSwap,
65 unsigned int num_points)
66 {
67
68 2 volk_16u_byteswap_a_sse2((uint16_t*)intsToSwap, num_points);
69 2 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint16_t));
70 2 }
71 #endif
72
73 #ifdef LV_HAVE_AVX2
74 2 static inline void volk_16u_byteswappuppet_16u_u_avx2(uint16_t* output,
75 uint16_t* intsToSwap,
76 unsigned int num_points)
77 {
78
79 2 volk_16u_byteswap_u_avx2((uint16_t*)intsToSwap, num_points);
80 2 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint16_t));
81 2 }
82 #endif
83
84 #ifdef LV_HAVE_AVX2
85 2 static inline void volk_16u_byteswappuppet_16u_a_avx2(uint16_t* output,
86 uint16_t* intsToSwap,
87 unsigned int num_points)
88 {
89
90 2 volk_16u_byteswap_a_avx2((uint16_t*)intsToSwap, num_points);
91 2 memcpy((void*)output, (void*)intsToSwap, num_points * sizeof(uint16_t));
92 2 }
93 #endif
94
95 #endif
96