Vector Optimized Library of Kernels 2.5.1
Architecture-tuned implementations of math kernels
 
Loading...
Searching...
No Matches
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 <stdio.h>
30#include <volk/volk_complex.h>
31
32
33#ifdef LV_HAVE_GENERIC
34
36 const lv_32fc_t* inVector,
37 const lv_32fc_t phase_inc,
38 unsigned int num_points)
39{
40 lv_32fc_t phase[1] = { lv_cmake(.3f, 0.95393f) };
41 (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
42 const lv_32fc_t phase_inc_n =
43 phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
45 outVector, inVector, phase_inc_n, phase, num_points);
46}
47
48#endif /* LV_HAVE_GENERIC */
49
50
51#ifdef LV_HAVE_NEON
52#include <arm_neon.h>
54
56 const lv_32fc_t* inVector,
57 const lv_32fc_t phase_inc,
58 unsigned int num_points)
59{
60 lv_32fc_t phase[1] = { lv_cmake(.3f, 0.95393f) };
61 (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
62 const lv_32fc_t phase_inc_n =
63 phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
65 outVector, inVector, phase_inc_n, phase, num_points);
66}
67
68#endif /* LV_HAVE_NEON */
69
70
71#ifdef LV_HAVE_SSE4_1
72#include <smmintrin.h>
73
74static inline void volk_32fc_s32fc_rotatorpuppet_32fc_a_sse4_1(lv_32fc_t* outVector,
75 const lv_32fc_t* inVector,
76 const lv_32fc_t phase_inc,
77 unsigned int num_points)
78{
79 lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
80 (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
81 const lv_32fc_t phase_inc_n =
82 phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
83 volk_32fc_s32fc_x2_rotator_32fc_a_sse4_1(
84 outVector, inVector, phase_inc_n, phase, num_points);
85}
86
87#endif /* LV_HAVE_SSE4_1 */
88
89
90#ifdef LV_HAVE_SSE4_1
91#include <smmintrin.h>
92static inline void volk_32fc_s32fc_rotatorpuppet_32fc_u_sse4_1(lv_32fc_t* outVector,
93 const lv_32fc_t* inVector,
94 const lv_32fc_t phase_inc,
95 unsigned int num_points)
96{
97 lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
98 (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
99 const lv_32fc_t phase_inc_n =
100 phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
101 volk_32fc_s32fc_x2_rotator_32fc_u_sse4_1(
102 outVector, inVector, phase_inc_n, phase, num_points);
103}
104
105#endif /* LV_HAVE_SSE4_1 */
106
107
108#ifdef LV_HAVE_AVX
109#include <immintrin.h>
110
112 const lv_32fc_t* inVector,
113 const lv_32fc_t phase_inc,
114 unsigned int num_points)
115{
116 lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
117 (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
118 const lv_32fc_t phase_inc_n =
119 phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
121 outVector, inVector, phase_inc_n, phase, num_points);
122}
123
124#endif /* LV_HAVE_AVX */
125
126
127#ifdef LV_HAVE_AVX
128#include <immintrin.h>
129
131 const lv_32fc_t* inVector,
132 const lv_32fc_t phase_inc,
133 unsigned int num_points)
134{
135 lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
136 (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
137 const lv_32fc_t phase_inc_n =
138 phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
140 outVector, inVector, phase_inc_n, phase, num_points);
141}
142
143#endif /* LV_HAVE_AVX */
144
145#if LV_HAVE_AVX && LV_HAVE_FMA
146#include <immintrin.h>
147
148static inline void volk_32fc_s32fc_rotatorpuppet_32fc_a_avx_fma(lv_32fc_t* outVector,
149 const lv_32fc_t* inVector,
150 const lv_32fc_t phase_inc,
151 unsigned int num_points)
152{
153 lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
154 (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
155 const lv_32fc_t phase_inc_n =
156 phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
157 volk_32fc_s32fc_x2_rotator_32fc_a_avx_fma(
158 outVector, inVector, phase_inc_n, phase, num_points);
159}
160
161#endif /* LV_HAVE_AVX && LV_HAVE_FMA*/
162
163
164#if LV_HAVE_AVX && LV_HAVE_FMA
165#include <immintrin.h>
166
167static inline void volk_32fc_s32fc_rotatorpuppet_32fc_u_avx_fma(lv_32fc_t* outVector,
168 const lv_32fc_t* inVector,
169 const lv_32fc_t phase_inc,
170 unsigned int num_points)
171{
172 lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
173 (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
174 const lv_32fc_t phase_inc_n =
175 phase_inc / hypotf(lv_creal(phase_inc), lv_cimag(phase_inc));
176 volk_32fc_s32fc_x2_rotator_32fc_u_avx_fma(
177 outVector, inVector, phase_inc_n, phase, num_points);
178}
179
180#endif /* LV_HAVE_AVX && LV_HAVE_FMA*/
181
182#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:55
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_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:130
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:111
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:129
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:507
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:96
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:433
#define lv_cimag(x)
Definition: volk_complex.h:89
#define lv_cmake(r, i)
Definition: volk_complex.h:68
#define lv_creal(x)
Definition: volk_complex.h:87
float complex lv_32fc_t
Definition: volk_complex.h:65