[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 12/14: volk: fixed some warnings
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 12/14: volk: fixed some warnings |
Date: |
Wed, 15 Oct 2014 23:25:09 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 729989df0cfd7e40f4d5a167160bf7cfb9eeec92
Author: Tom Rondeau <address@hidden>
Date: Wed Oct 15 12:33:48 2014 -0400
volk: fixed some warnings
---
volk/kernels/volk/volk_32f_acos_32f.h | 6 +++---
volk/kernels/volk/volk_32f_asin_32f.h | 6 +++---
volk/kernels/volk/volk_32f_cos_32f.h | 8 ++------
volk/kernels/volk/volk_32f_sin_32f.h | 30 ++++++++++++++----------------
4 files changed, 22 insertions(+), 28 deletions(-)
diff --git a/volk/kernels/volk/volk_32f_acos_32f.h
b/volk/kernels/volk/volk_32f_acos_32f.h
index 19444df..945ba39 100644
--- a/volk/kernels/volk/volk_32f_acos_32f.h
+++ b/volk/kernels/volk/volk_32f_acos_32f.h
@@ -3,7 +3,7 @@
#include <inttypes.h>
/* This is the number of terms of Taylor series to evaluate, increase this for
more accuracy*/
-#define TERMS 2
+#define ACOS_TERMS 2
#ifndef INCLUDED_volk_32f_acos_32f_a_H
#define INCLUDED_volk_32f_acos_32f_a_H
@@ -51,7 +51,7 @@ static inline void volk_32f_acos_32f_a_sse4_1(float* bVector,
const float* aVect
}
x = _mm_div_ps(fones, x);
y = fzeroes;
- for(j = TERMS - 1; j >=0 ; j--){
+ for(j = ACOS_TERMS - 1; j >=0 ; j--){
y = _mm_add_ps(_mm_mul_ps(y, _mm_mul_ps(x, x)),
_mm_set1_ps(pow(-1,j)/(2*j+1)));
}
@@ -125,7 +125,7 @@ static inline void volk_32f_acos_32f_u_sse4_1(float*
bVector, const float* aVect
}
x = _mm_div_ps(fones, x);
y = fzeroes;
- for(j = TERMS - 1; j >=0 ; j--){
+ for(j = ACOS_TERMS - 1; j >=0 ; j--){
x = _mm_add_ps(_mm_mul_ps(y, _mm_mul_ps(x, x)),
_mm_set1_ps(pow(-1,j)/(2*j+1)));
}
diff --git a/volk/kernels/volk/volk_32f_asin_32f.h
b/volk/kernels/volk/volk_32f_asin_32f.h
index 80a834b..2bae3a5 100644
--- a/volk/kernels/volk/volk_32f_asin_32f.h
+++ b/volk/kernels/volk/volk_32f_asin_32f.h
@@ -3,7 +3,7 @@
#include <inttypes.h>
/* This is the number of terms of Taylor series to evaluate, increase this for
more accuracy*/
-#define TERMS 2
+#define ASIN_TERMS 2
#ifndef INCLUDED_volk_32f_asin_32f_a_H
#define INCLUDED_volk_32f_asin_32f_a_H
@@ -49,7 +49,7 @@ static inline void volk_32f_asin_32f_a_sse4_1(float* bVector,
const float* aVect
}
x = _mm_div_ps(fones, x);
y = fzeroes;
- for(j = TERMS - 1; j >=0 ; j--){
+ for(j = ASIN_TERMS - 1; j >=0 ; j--){
y = _mm_add_ps(_mm_mul_ps(y, _mm_mul_ps(x, x)),
_mm_set1_ps(pow(-1,j)/(2*j+1)));
}
@@ -120,7 +120,7 @@ static inline void volk_32f_asin_32f_u_sse4_1(float*
bVector, const float* aVect
}
x = _mm_div_ps(fones, x);
y = fzeroes;
- for(j = TERMS - 1; j >=0 ; j--){
+ for(j = ASIN_TERMS - 1; j >=0 ; j--){
y = _mm_add_ps(_mm_mul_ps(y, _mm_mul_ps(x, x)),
_mm_set1_ps(pow(-1,j)/(2*j+1)));
}
diff --git a/volk/kernels/volk/volk_32f_cos_32f.h
b/volk/kernels/volk/volk_32f_cos_32f.h
index 7aa575f..8603c92 100644
--- a/volk/kernels/volk/volk_32f_cos_32f.h
+++ b/volk/kernels/volk/volk_32f_cos_32f.h
@@ -23,7 +23,7 @@ static inline void volk_32f_cos_32f_a_sse4_1(float* bVector,
const float* aVecto
unsigned int i = 0;
__m128 aVal, s, m4pi, pio4A, pio4B, cp1, cp2, cp3, cp4, cp5, ffours,
ftwos, fones, fzeroes;
- __m128 sine, cosine, condition1, condition2, condition3;
+ __m128 sine, cosine, condition1, condition3;
__m128i q, r, ones, twos, fours;
m4pi = _mm_set1_ps(1.273239545);
@@ -66,8 +66,6 @@ static inline void volk_32f_cos_32f_a_sse4_1(float* bVector,
const float* aVecto
condition1 = _mm_cmpneq_ps(_mm_cvtepi32_ps(_mm_and_si128(_mm_add_epi32(q,
ones), twos)), fzeroes);
- // Need this condition only for sin
- //condition2 =
_mm_cmpneq_ps(_mm_cmpneq_ps(_mm_cvtepi32_ps(_mm_and_si128(q, fours)), fzeroes),
_mm_cmplt_ps(aVal, fzeroes));
condition3 = _mm_cmpneq_ps(_mm_cvtepi32_ps(_mm_and_si128(_mm_add_epi32(q,
twos), fours)), fzeroes);
cosine = _mm_add_ps(cosine, _mm_and_ps(_mm_sub_ps(sine, cosine),
condition1));
@@ -108,7 +106,7 @@ static inline void volk_32f_cos_32f_u_sse4_1(float*
bVector, const float* aVecto
unsigned int i = 0;
__m128 aVal, s, m4pi, pio4A, pio4B, cp1, cp2, cp3, cp4, cp5, ffours,
ftwos, fones, fzeroes;
- __m128 sine, cosine, condition1, condition2, condition3;
+ __m128 sine, cosine, condition1, condition3;
__m128i q, r, ones, twos, fours;
m4pi = _mm_set1_ps(1.273239545);
@@ -152,8 +150,6 @@ static inline void volk_32f_cos_32f_u_sse4_1(float*
bVector, const float* aVecto
condition1 =
_mm_cmpneq_ps(_mm_cvtepi32_ps(_mm_and_si128(_mm_add_epi32(q, ones), twos)),
fzeroes);
- // Need this condition only for sin
- //condition2 =
_mm_cmpneq_ps(_mm_cmpneq_ps(_mm_cvtepi32_ps(_mm_and_si128(q, fours)), fzeroes),
_mm_cmplt_ps(aVal, fzeroes));
condition3 =
_mm_cmpneq_ps(_mm_cvtepi32_ps(_mm_and_si128(_mm_add_epi32(q, twos), fours)),
fzeroes);
cosine = _mm_add_ps(cosine, _mm_and_ps(_mm_sub_ps(sine, cosine),
condition1));
diff --git a/volk/kernels/volk/volk_32f_sin_32f.h
b/volk/kernels/volk/volk_32f_sin_32f.h
index 96e021a..773edf2 100644
--- a/volk/kernels/volk/volk_32f_sin_32f.h
+++ b/volk/kernels/volk/volk_32f_sin_32f.h
@@ -17,13 +17,13 @@ static inline void volk_32f_sin_32f_a_sse4_1(float*
bVector, const float* aVecto
float* bPtr = bVector;
const float* aPtr = aVector;
-
+
unsigned int number = 0;
unsigned int quarterPoints = num_points / 4;
unsigned int i = 0;
__m128 aVal, s, m4pi, pio4A, pio4B, cp1, cp2, cp3, cp4, cp5, ffours,
ftwos, fones, fzeroes;
- __m128 sine, cosine, condition1, condition2, condition3;
+ __m128 sine, cosine, condition1, condition2;
__m128i q, r, ones, twos, fours;
m4pi = _mm_set1_ps(1.273239545);
@@ -43,8 +43,8 @@ static inline void volk_32f_sin_32f_a_sse4_1(float* bVector,
const float* aVecto
cp4 = _mm_set1_ps(0.49603e-4);
cp5 = _mm_set1_ps(0.551e-6);
- for(;number < quarterPoints; number++){
- aVal = _mm_load_ps(aPtr);
+ for(;number < quarterPoints; number++){
+ aVal = _mm_load_ps(aPtr);
s = _mm_sub_ps(aVal, _mm_and_ps(_mm_mul_ps(aVal, ftwos),
_mm_cmplt_ps(aVal, fzeroes)));
q = _mm_cvtps_epi32(_mm_mul_ps(s, m4pi));
r = _mm_add_epi32(q, _mm_and_si128(q, ones));
@@ -56,7 +56,7 @@ static inline void volk_32f_sin_32f_a_sse4_1(float* bVector,
const float* aVecto
s = _mm_mul_ps(s, s);
// Evaluate Taylor series
s =
_mm_mul_ps(_mm_add_ps(_mm_mul_ps(_mm_sub_ps(_mm_mul_ps(_mm_add_ps(_mm_mul_ps(_mm_sub_ps(_mm_mul_ps(s,
cp5), cp4), s), cp3), s), cp2), s), cp1), s);
-
+
for(i = 0; i < 3; i++) {
s = _mm_mul_ps(s, _mm_sub_ps(ffours, s));
}
@@ -76,7 +76,7 @@ static inline void volk_32f_sin_32f_a_sse4_1(float* bVector,
const float* aVecto
aPtr += 4;
bPtr += 4;
}
-
+
number = quarterPoints * 4;
for(;number < num_points; number++){
*bPtr++ = sin(*aPtr++);
@@ -101,13 +101,13 @@ static inline void volk_32f_sin_32f_u_sse4_1(float*
bVector, const float* aVecto
float* bPtr = bVector;
const float* aPtr = aVector;
-
+
unsigned int number = 0;
unsigned int quarterPoints = num_points / 4;
unsigned int i = 0;
__m128 aVal, s, m4pi, pio4A, pio4B, cp1, cp2, cp3, cp4, cp5, ffours,
ftwos, fones, fzeroes;
- __m128 sine, cosine, condition1, condition2, condition3;
+ __m128 sine, cosine, condition1, condition2;
__m128i q, r, ones, twos, fours;
m4pi = _mm_set1_ps(1.273239545);
@@ -127,8 +127,8 @@ static inline void volk_32f_sin_32f_u_sse4_1(float*
bVector, const float* aVecto
cp4 = _mm_set1_ps(0.49603e-4);
cp5 = _mm_set1_ps(0.551e-6);
- for(;number < quarterPoints; number++){
- aVal = _mm_loadu_ps(aPtr);
+ for(;number < quarterPoints; number++){
+ aVal = _mm_loadu_ps(aPtr);
s = _mm_sub_ps(aVal, _mm_and_ps(_mm_mul_ps(aVal, ftwos),
_mm_cmplt_ps(aVal, fzeroes)));
q = _mm_cvtps_epi32(_mm_mul_ps(s, m4pi));
r = _mm_add_epi32(q, _mm_and_si128(q, ones));
@@ -140,7 +140,7 @@ static inline void volk_32f_sin_32f_u_sse4_1(float*
bVector, const float* aVecto
s = _mm_mul_ps(s, s);
// Evaluate Taylor series
s =
_mm_mul_ps(_mm_add_ps(_mm_mul_ps(_mm_sub_ps(_mm_mul_ps(_mm_add_ps(_mm_mul_ps(_mm_sub_ps(_mm_mul_ps(s,
cp5), cp4), s), cp3), s), cp2), s), cp1), s);
-
+
for(i = 0; i < 3; i++) {
s = _mm_mul_ps(s, _mm_sub_ps(ffours, s));
}
@@ -151,8 +151,6 @@ static inline void volk_32f_sin_32f_u_sse4_1(float*
bVector, const float* aVecto
condition1 =
_mm_cmpneq_ps(_mm_cvtepi32_ps(_mm_and_si128(_mm_add_epi32(q, ones), twos)),
fzeroes);
condition2 =
_mm_cmpneq_ps(_mm_cmpneq_ps(_mm_cvtepi32_ps(_mm_and_si128(q, fours)), fzeroes),
_mm_cmplt_ps(aVal, fzeroes));
- // Need this condition only for cos
- //condition3 =
_mm_cmpneq_ps(_mm_cvtepi32_ps(_mm_and_si128(_mm_add_epi32(q, twos), fours)),
fzeroes);
sine = _mm_add_ps(sine, _mm_and_ps(_mm_sub_ps(cosine, sine),
condition1));
sine = _mm_sub_ps(sine, _mm_and_ps(_mm_mul_ps(sine,
_mm_set1_ps(2.0f)), condition2));
@@ -160,7 +158,7 @@ static inline void volk_32f_sin_32f_u_sse4_1(float*
bVector, const float* aVecto
aPtr += 4;
bPtr += 4;
}
-
+
number = quarterPoints * 4;
for(;number < num_points; number++){
*bPtr++ = sin(*aPtr++);
@@ -176,7 +174,7 @@ static inline void volk_32f_sin_32f_u_sse4_1(float*
bVector, const float* aVecto
\param aVector The input vector of floats
\param num_points Number of points for which sine is to be computed
*/
-static inline void volk_32f_sin_32f_generic(float* bVector, const float*
aVector, unsigned int num_points){
+static inline void volk_32f_sin_32f_generic(float* bVector, const float*
aVector, unsigned int num_points){
float* bPtr = bVector;
const float* aPtr = aVector;
unsigned int number = 0;
@@ -184,7 +182,7 @@ static inline void volk_32f_sin_32f_generic(float* bVector,
const float* aVector
for(number = 0; number < num_points; number++){
*bPtr++ = sin(*aPtr++);
}
-
+
}
#endif /* LV_HAVE_GENERIC */
- [Commit-gnuradio] [gnuradio] branch master updated (d50c57a -> 8ebe90f), git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 03/14: volk: temp log kernels., git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 04/14: volk: Added log2, git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 06/14: volk: expfast comments, git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 08/14: volk: Added sin, cos kernels., git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 12/14: volk: fixed some warnings,
git <=
- [Commit-gnuradio] [gnuradio] 13/14: volk: fixed a problem with acos during some translation in the git history., git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 09/14: volk: Added tan kernel., git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 07/14: volk: added power kernel., git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 10/14: volk: Added atan, asin, acos kernels., git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 01/14: added new proto-kernels, git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 05/14: volk: Added avx proto-kernel for fast exp., git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 02/14: volk: Added proto-kernels for convert, multiply, conjugate, deinterleave, magnitude, mag-square, psd functions., git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 11/14: volk (gsoc): whitespace, git, 2014/10/15
- [Commit-gnuradio] [gnuradio] 14/14: volk: adding copyright notice to all volk kernels., git, 2014/10/15