Vector Optimized Library of Kernels  2.2
Architecture-tuned implementations of math kernels
volk_32fc_s32fc_rotatorpuppet_32fc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2012, 2013, 2014 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 
24 #ifndef INCLUDED_volk_32fc_s32fc_rotatorpuppet_32fc_a_H
25 #define INCLUDED_volk_32fc_s32fc_rotatorpuppet_32fc_a_H
26 
27 
28 #include <volk/volk_complex.h>
29 #include <stdio.h>
31 
32 
33 #ifdef LV_HAVE_GENERIC
34 
35 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_generic(lv_32fc_t* outVector, const lv_32fc_t* inVector, const lv_32fc_t phase_inc, unsigned int num_points){
36  lv_32fc_t phase[1] = {lv_cmake(.3, 0.95393)};
37  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
38  const lv_32fc_t phase_inc_n = phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
39  volk_32fc_s32fc_x2_rotator_32fc_generic(outVector, inVector, phase_inc_n, phase, num_points);
40 
41 }
42 
43 #endif /* LV_HAVE_GENERIC */
44 
45 
46 #ifdef LV_HAVE_NEON
47 #include <arm_neon.h>
49 
50 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_neon(lv_32fc_t* outVector, const lv_32fc_t* inVector, const lv_32fc_t phase_inc, unsigned int num_points){
51  lv_32fc_t phase[1] = {lv_cmake(.3, 0.95393)};
52  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
53  const lv_32fc_t phase_inc_n = phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
54  volk_32fc_s32fc_x2_rotator_32fc_neon(outVector, inVector, phase_inc_n, phase, num_points);
55 
56 }
57 
58 #endif /* LV_HAVE_NEON */
59 
60 
61 #ifdef LV_HAVE_SSE4_1
62 #include <smmintrin.h>
63 
64 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_a_sse4_1(lv_32fc_t* outVector, const lv_32fc_t* inVector, const lv_32fc_t phase_inc, unsigned int num_points){
65  lv_32fc_t phase[1] = {lv_cmake(.3, .95393)};
66  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
67  const lv_32fc_t phase_inc_n = phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
68  volk_32fc_s32fc_x2_rotator_32fc_a_sse4_1(outVector, inVector, phase_inc_n, phase, num_points);
69 
70 }
71 
72 #endif /* LV_HAVE_SSE4_1 */
73 
74 
75 #ifdef LV_HAVE_SSE4_1
76 #include <smmintrin.h>
77 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_u_sse4_1(lv_32fc_t* outVector, const lv_32fc_t* inVector, const lv_32fc_t phase_inc, unsigned int num_points){
78  lv_32fc_t phase[1] = {lv_cmake(.3, .95393)};
79  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
80  const lv_32fc_t phase_inc_n = phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
81  volk_32fc_s32fc_x2_rotator_32fc_u_sse4_1(outVector, inVector, phase_inc_n, phase, num_points);
82 
83 }
84 
85 #endif /* LV_HAVE_SSE4_1 */
86 
87 
88 #ifdef LV_HAVE_AVX
89 #include <immintrin.h>
90 
91 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_a_avx(lv_32fc_t* outVector, const lv_32fc_t* inVector, const lv_32fc_t phase_inc, unsigned int num_points){
92  lv_32fc_t phase[1] = {lv_cmake(.3, .95393)};
93  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
94  const lv_32fc_t phase_inc_n = phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
95  volk_32fc_s32fc_x2_rotator_32fc_a_avx(outVector, inVector, phase_inc_n, phase, num_points);
96 }
97 
98 #endif /* LV_HAVE_AVX */
99 
100 
101 #ifdef LV_HAVE_AVX
102 #include <immintrin.h>
103 
104 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_u_avx(lv_32fc_t* outVector, const lv_32fc_t* inVector, const lv_32fc_t phase_inc, unsigned int num_points){
105  lv_32fc_t phase[1] = {lv_cmake(.3, .95393)};
106  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
107  const lv_32fc_t phase_inc_n = phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
108  volk_32fc_s32fc_x2_rotator_32fc_u_avx(outVector, inVector, phase_inc_n, phase, num_points);
109 }
110 
111 #endif /* LV_HAVE_AVX */
112 
113 #if LV_HAVE_AVX && LV_HAVE_FMA
114 #include <immintrin.h>
115 
116 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_a_avx_fma(lv_32fc_t* outVector, const lv_32fc_t* inVector, const lv_32fc_t phase_inc, unsigned int num_points){
117  lv_32fc_t phase[1] = {lv_cmake(.3, .95393)};
118  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
119  const lv_32fc_t phase_inc_n = phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
120  volk_32fc_s32fc_x2_rotator_32fc_a_avx_fma(outVector, inVector, phase_inc_n, phase, num_points);
121 }
122 
123 #endif /* LV_HAVE_AVX && LV_HAVE_FMA*/
124 
125 
126 #if LV_HAVE_AVX && LV_HAVE_FMA
127 #include <immintrin.h>
128 
129 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_u_avx_fma(lv_32fc_t* outVector, const lv_32fc_t* inVector, const lv_32fc_t phase_inc, unsigned int num_points){
130  lv_32fc_t phase[1] = {lv_cmake(.3, .95393)};
131  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
132  const lv_32fc_t phase_inc_n = phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
133  volk_32fc_s32fc_x2_rotator_32fc_u_avx_fma(outVector, inVector, phase_inc_n, phase, num_points);
134 }
135 
136 #endif /* LV_HAVE_AVX && LV_HAVE_FMA*/
137 
138 #endif /* INCLUDED_volk_32fc_s32fc_rotatorpuppet_32fc_a_H */
static void volk_32fc_s32fc_rotatorpuppet_32fc_u_avx(lv_32fc_t *outVector, const lv_32fc_t *inVector, const lv_32fc_t phase_inc, unsigned int num_points)
Definition: volk_32fc_s32fc_rotatorpuppet_32fc.h:104
static void volk_32fc_s32fc_rotatorpuppet_32fc_neon(lv_32fc_t *outVector, const lv_32fc_t *inVector, const lv_32fc_t phase_inc, unsigned int num_points)
Definition: volk_32fc_s32fc_rotatorpuppet_32fc.h:50
static void volk_32fc_s32fc_x2_rotator_32fc_generic(lv_32fc_t *outVector, const lv_32fc_t *inVector, const lv_32fc_t phase_inc, lv_32fc_t *phase, unsigned int num_points)
Definition: volk_32fc_s32fc_x2_rotator_32fc.h:93
static void volk_32fc_s32fc_x2_rotator_32fc_a_avx(lv_32fc_t *outVector, const lv_32fc_t *inVector, const lv_32fc_t phase_inc, lv_32fc_t *phase, unsigned int num_points)
Definition: volk_32fc_s32fc_x2_rotator_32fc.h:422
static void volk_32fc_s32fc_rotatorpuppet_32fc_a_avx(lv_32fc_t *outVector, const lv_32fc_t *inVector, const lv_32fc_t phase_inc, unsigned int num_points)
Definition: volk_32fc_s32fc_rotatorpuppet_32fc.h:91
#define lv_cmake(r, i)
Definition: volk_complex.h:64
float complex lv_32fc_t
Definition: volk_complex.h:61
static void volk_32fc_s32fc_x2_rotator_32fc_u_avx(lv_32fc_t *outVector, const lv_32fc_t *inVector, const lv_32fc_t phase_inc, lv_32fc_t *phase, unsigned int num_points)
Definition: volk_32fc_s32fc_x2_rotator_32fc.h:489
static void volk_32fc_s32fc_rotatorpuppet_32fc_generic(lv_32fc_t *outVector, const lv_32fc_t *inVector, const lv_32fc_t phase_inc, unsigned int num_points)
Definition: volk_32fc_s32fc_rotatorpuppet_32fc.h:35
static void volk_32fc_s32fc_x2_rotator_32fc_neon(lv_32fc_t *outVector, const lv_32fc_t *inVector, const lv_32fc_t phase_inc, lv_32fc_t *phase, unsigned int num_points)
Definition: volk_32fc_s32fc_x2_rotator_32fc.h:121
#define lv_creal(x)
Definition: volk_complex.h:83
#define lv_cimag(x)
Definition: volk_complex.h:85