Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(423052)

Unified Diff: libspeexdsp/resample_neon.h

Issue 1548: speexdsp: add initial check-asm for inner_product_*
Patch Set: Created 2 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « libspeexdsp/resample_checkasm.h ('k') | libspeexdsp/resample_sse.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libspeexdsp/resample_neon.h
diff --git a/libspeexdsp/resample_neon.h b/libspeexdsp/resample_neon.h
index 0acbd27b9a7f6265164ee66b909b40c5cb20a989..88c46f4c9e3073443b821c1c108e4f829fae058e 100644
--- a/libspeexdsp/resample_neon.h
+++ b/libspeexdsp/resample_neon.h
@@ -38,6 +38,10 @@
#include <arm_neon.h>
+#if defined(CHECK_ASM)
+#include "resample_checkasm.h"
+#endif
+
#ifdef FIXED_POINT
#ifdef __thumb2__
static inline int32_t saturate_32bit_to_16bit(int32_t a) {
@@ -67,6 +71,9 @@ static inline int32_t saturate_32bit_to_16bit(int32_t a) {
/* Only works when len % 4 == 0 */
static inline int32_t inner_product_single(const int16_t *a, const int16_t *b, unsigned int len)
{
+#if defined(CHECK_ASM)
+ int32_t expected;
+#endif
int32_t ret;
uint32_t remainder = len % 16;
len = len - remainder;
@@ -119,6 +126,10 @@ static inline int32_t inner_product_single(const int16_t *a, const int16_t *b, u
"d16", "d17", "d18", "d19",
"d20", "d21", "d22", "d23");
+#if defined(CHECK_ASM)
+ expected = 0;
+ RESAMPLE_CHECK_INNER_PRODUCT(a, b, len, ret, expected, "%d");
+#endif
return ret;
}
#elif defined(FLOATING_POINT)
@@ -142,6 +153,9 @@ static inline int32_t saturate_float_to_16bit(float a) {
static inline float inner_product_single(const float *a, const float *b, unsigned int len)
{
float ret;
+#if defined(CHECK_ASM)
+ float expected;
+#endif
uint32_t remainder = len % 16;
len = len - remainder;
@@ -196,6 +210,10 @@ static inline float inner_product_single(const float *a, const float *b, unsigne
:
: "cc", "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8",
"q9", "q10", "q11");
+#if defined(CHECK_ASM)
+ expected = 0.0;
+ RESAMPLE_CHECK_INNER_PRODUCT(a, b, len, ret, expected, "%f");
+#endif
return ret;
}
#endif
« no previous file with comments | « libspeexdsp/resample_checkasm.h ('k') | libspeexdsp/resample_sse.h » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld