Vector Optimized Library of Kernels  3.0.0
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 VOLK
6  *
7  * SPDX-License-Identifier: LGPL-3.0-or-later
8  */
9 
10 
11 #ifndef INCLUDED_volk_32fc_s32fc_rotatorpuppet_32fc_a_H
12 #define INCLUDED_volk_32fc_s32fc_rotatorpuppet_32fc_a_H
13 
14 
15 #include <stdio.h>
17 #include <volk/volk_complex.h>
18 
19 
20 #ifdef LV_HAVE_GENERIC
21 
23  const lv_32fc_t* inVector,
24  const lv_32fc_t phase_inc,
25  unsigned int num_points)
26 {
27  lv_32fc_t phase[1] = { lv_cmake(.3f, 0.95393f) };
28  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
29  const lv_32fc_t phase_inc_n =
30  phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
32  outVector, inVector, phase_inc_n, phase, num_points);
33 }
34 
35 #endif /* LV_HAVE_GENERIC */
36 
37 
38 #ifdef LV_HAVE_NEON
39 #include <arm_neon.h>
41 
42 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_neon(lv_32fc_t* outVector,
43  const lv_32fc_t* inVector,
44  const lv_32fc_t phase_inc,
45  unsigned int num_points)
46 {
47  lv_32fc_t phase[1] = { lv_cmake(.3f, 0.95393f) };
48  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
49  const lv_32fc_t phase_inc_n =
50  phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
52  outVector, inVector, phase_inc_n, phase, num_points);
53 }
54 
55 #endif /* LV_HAVE_NEON */
56 
57 
58 #ifdef LV_HAVE_SSE4_1
59 #include <smmintrin.h>
60 
61 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_a_sse4_1(lv_32fc_t* outVector,
62  const lv_32fc_t* inVector,
63  const lv_32fc_t phase_inc,
64  unsigned int num_points)
65 {
66  lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
67  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
68  const lv_32fc_t phase_inc_n =
69  phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
70  volk_32fc_s32fc_x2_rotator_32fc_a_sse4_1(
71  outVector, inVector, phase_inc_n, phase, num_points);
72 }
73 
74 #endif /* LV_HAVE_SSE4_1 */
75 
76 
77 #ifdef LV_HAVE_SSE4_1
78 #include <smmintrin.h>
79 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_u_sse4_1(lv_32fc_t* outVector,
80  const lv_32fc_t* inVector,
81  const lv_32fc_t phase_inc,
82  unsigned int num_points)
83 {
84  lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
85  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
86  const lv_32fc_t phase_inc_n =
87  phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
88  volk_32fc_s32fc_x2_rotator_32fc_u_sse4_1(
89  outVector, inVector, phase_inc_n, phase, num_points);
90 }
91 
92 #endif /* LV_HAVE_SSE4_1 */
93 
94 
95 #ifdef LV_HAVE_AVX
96 #include <immintrin.h>
97 
99  const lv_32fc_t* inVector,
100  const lv_32fc_t phase_inc,
101  unsigned int num_points)
102 {
103  lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
104  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
105  const lv_32fc_t phase_inc_n =
106  phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
108  outVector, inVector, phase_inc_n, phase, num_points);
109 }
110 
111 #endif /* LV_HAVE_AVX */
112 
113 
114 #ifdef LV_HAVE_AVX
115 #include <immintrin.h>
116 
118  const lv_32fc_t* inVector,
119  const lv_32fc_t phase_inc,
120  unsigned int num_points)
121 {
122  lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
123  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
124  const lv_32fc_t phase_inc_n =
125  phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
127  outVector, inVector, phase_inc_n, phase, num_points);
128 }
129 
130 #endif /* LV_HAVE_AVX */
131 
132 #if LV_HAVE_AVX && LV_HAVE_FMA
133 #include <immintrin.h>
134 
135 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_a_avx_fma(lv_32fc_t* outVector,
136  const lv_32fc_t* inVector,
137  const lv_32fc_t phase_inc,
138  unsigned int num_points)
139 {
140  lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
141  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
142  const lv_32fc_t phase_inc_n =
143  phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
144  volk_32fc_s32fc_x2_rotator_32fc_a_avx_fma(
145  outVector, inVector, phase_inc_n, phase, num_points);
146 }
147 
148 #endif /* LV_HAVE_AVX && LV_HAVE_FMA*/
149 
150 
151 #if LV_HAVE_AVX && LV_HAVE_FMA
152 #include <immintrin.h>
153 
154 static inline void volk_32fc_s32fc_rotatorpuppet_32fc_u_avx_fma(lv_32fc_t* outVector,
155  const lv_32fc_t* inVector,
156  const lv_32fc_t phase_inc,
157  unsigned int num_points)
158 {
159  lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
160  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
161  const lv_32fc_t phase_inc_n =
162  phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
163  volk_32fc_s32fc_x2_rotator_32fc_u_avx_fma(
164  outVector, inVector, phase_inc_n, phase, num_points);
165 }
166 
167 #endif /* LV_HAVE_AVX && LV_HAVE_FMA*/
168 
169 #endif /* INCLUDED_volk_32fc_s32fc_rotatorpuppet_32fc_a_H */
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:42
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:22
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:117
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:98
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:116
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:494
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:83
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:420
#define lv_cimag(x)
Definition: volk_complex.h:98
#define lv_cmake(r, i)
Definition: volk_complex.h:77
#define lv_creal(x)
Definition: volk_complex.h:96
float complex lv_32fc_t
Definition: volk_complex.h:74