Vector Optimized Library of Kernels  3.3.0
Architecture-tuned implementations of math kernels
volk_32fc_s32fc_rotator2puppet_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_rotator2puppet_32fc_a_H
12 #define INCLUDED_volk_32fc_s32fc_rotator2puppet_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 
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_AVX
59 #include <immintrin.h>
60 
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));
71  outVector, inVector, &phase_inc_n, phase, num_points);
72 }
73 
74 #endif /* LV_HAVE_AVX */
75 
76 
77 #ifdef LV_HAVE_AVX
78 #include <immintrin.h>
79 
81  const lv_32fc_t* inVector,
82  const lv_32fc_t* phase_inc,
83  unsigned int num_points)
84 {
85  lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
86  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
87  const lv_32fc_t phase_inc_n =
88  *phase_inc / hypotf(lv_creal(*phase_inc), lv_cimag(*phase_inc));
90  outVector, inVector, &phase_inc_n, phase, num_points);
91 }
92 
93 #endif /* LV_HAVE_AVX */
94 
95 
96 #ifdef LV_HAVE_AVX512F
97 #include <immintrin.h>
98 
99 static inline void
100 volk_32fc_s32fc_rotator2puppet_32fc_a_avx512f(lv_32fc_t* outVector,
101  const lv_32fc_t* inVector,
102  const lv_32fc_t* phase_inc,
103  unsigned int num_points)
104 {
105  lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
106  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
107  const lv_32fc_t phase_inc_n =
108  *phase_inc / hypotf(lv_creal(*phase_inc), lv_cimag(*phase_inc));
109  volk_32fc_s32fc_x2_rotator2_32fc_a_avx512f(
110  outVector, inVector, &phase_inc_n, phase, num_points);
111 }
112 
113 #endif /* LV_HAVE_AVX512F */
114 
115 
116 #ifdef LV_HAVE_AVX512F
117 #include <immintrin.h>
118 
119 static inline void
120 volk_32fc_s32fc_rotator2puppet_32fc_u_avx512f(lv_32fc_t* outVector,
121  const lv_32fc_t* inVector,
122  const lv_32fc_t* phase_inc,
123  unsigned int num_points)
124 {
125  lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
126  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
127  const lv_32fc_t phase_inc_n =
128  *phase_inc / hypotf(lv_creal(*phase_inc), lv_cimag(*phase_inc));
129  volk_32fc_s32fc_x2_rotator2_32fc_u_avx512f(
130  outVector, inVector, &phase_inc_n, phase, num_points);
131 }
132 
133 #endif /* LV_HAVE_AVX512F */
134 
135 #ifdef LV_HAVE_RVV
136 static inline void volk_32fc_s32fc_rotator2puppet_32fc_rvv(lv_32fc_t* outVector,
137  const lv_32fc_t* inVector,
138  const lv_32fc_t* phase_inc,
139  unsigned int num_points)
140 {
141  lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
142  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
143  const lv_32fc_t phase_inc_n =
144  *phase_inc / hypotf(lv_creal(*phase_inc), lv_cimag(*phase_inc));
145  volk_32fc_s32fc_x2_rotator2_32fc_rvv(
146  outVector, inVector, &phase_inc_n, phase, num_points);
147 }
148 #endif /*LV_HAVE_RVV*/
149 
150 
151 #ifdef LV_HAVE_RVVSEG
152 static inline void volk_32fc_s32fc_rotator2puppet_32fc_rvvseg(lv_32fc_t* outVector,
153  const lv_32fc_t* inVector,
154  const lv_32fc_t* phase_inc,
155  unsigned int num_points)
156 {
157  lv_32fc_t phase[1] = { lv_cmake(.3f, .95393f) };
158  (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
159  const lv_32fc_t phase_inc_n =
160  *phase_inc / hypotf(lv_creal(*phase_inc), lv_cimag(*phase_inc));
161  volk_32fc_s32fc_x2_rotator2_32fc_rvv(
162  outVector, inVector, &phase_inc_n, phase, num_points);
163 }
164 #endif /*LV_HAVE_RVVSEG*/
165 #endif /* INCLUDED_volk_32fc_s32fc_rotator2puppet_32fc_a_H */
lv_cimag
#define lv_cimag(x)
Definition: volk_complex.h:98
volk_32fc_s32fc_x2_rotator2_32fc_generic
static void volk_32fc_s32fc_x2_rotator2_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_rotator2_32fc.h:84
volk_32fc_s32fc_rotator2puppet_32fc_u_avx
static void volk_32fc_s32fc_rotator2puppet_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_rotator2puppet_32fc.h:80
lv_cmake
#define lv_cmake(r, i)
Definition: volk_complex.h:77
volk_32fc_s32fc_rotator2puppet_32fc_a_avx
static void volk_32fc_s32fc_rotator2puppet_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_rotator2puppet_32fc.h:61
volk_32fc_s32fc_x2_rotator2_32fc_neon
static void volk_32fc_s32fc_x2_rotator2_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)
NEON implementation with angle-based resync for numerical stability.
Definition: volk_32fc_s32fc_x2_rotator2_32fc.h:127
lv_32fc_t
float complex lv_32fc_t
Definition: volk_complex.h:74
volk_complex.h
volk_32fc_s32fc_rotator2puppet_32fc_neon
static void volk_32fc_s32fc_rotator2puppet_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_rotator2puppet_32fc.h:42
volk_32fc_s32fc_x2_rotator2_32fc_a_avx
static void volk_32fc_s32fc_x2_rotator2_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)
AVX implementation with angle-based resync for numerical stability.
Definition: volk_32fc_s32fc_x2_rotator2_32fc.h:278
bit128::f
float f[4]
Definition: volk_common.h:120
volk_neon_intrinsics.h
volk_32fc_s32fc_rotator2puppet_32fc_generic
static void volk_32fc_s32fc_rotator2puppet_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_rotator2puppet_32fc.h:22
volk_32fc_s32fc_x2_rotator2_32fc_u_avx
static void volk_32fc_s32fc_x2_rotator2_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)
Unaligned AVX implementation with angle-based resync for numerical stability.
Definition: volk_32fc_s32fc_x2_rotator2_32fc.h:425
volk_32fc_s32fc_x2_rotator2_32fc.h
lv_creal
#define lv_creal(x)
Definition: volk_complex.h:96