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

Side by Side Diff: libspeexdsp/resample_checkasm.h

Issue 1548: speexdsp: add initial check-asm for inner_product_*
Patch Set: Created 1 year, 6 months ago
Left:
Right:
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 unified diff | Download patch
« no previous file with comments | « libspeexdsp/Makefile.am ('k') | libspeexdsp/resample_neon.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Copyright (C) 2017 Tristan Matthews */
2 /**
3 @file resample_checkasm.h
4 @brief ASM validation functions
5 */
6 /*
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions
9 are met:
10
11 - Redistributions of source code must retain the above copyright
12 notice, this list of conditions and the following disclaimer.
13
14 - Redistributions in binary form must reproduce the above copyright
15 notice, this list of conditions and the following disclaimer in the
16 documentation and/or other materials provided with the distribution.
17
18 - Neither the name of the Xiph.org Foundation nor the names of its
19 contributors may be used to endorse or promote products derived from
20 this software without specific prior written permission.
21
22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
26 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35 #ifndef RESAMPLE_CHECKASM_H
36 #define RESAMPLE_CHECKASM_H
37
38 #include <stdio.h>
39 #include "os_support.h"
40
41 #define RESAMPLE_CHECK_INNER_PRODUCT(a, b, len, ret, expected, fmt) \
42 do { \
43 for (i = 0; i < len; i++) { \
44 expected += a[i]*b[i]; \
45 } \
46 if (expected != ret) { \
47 fprintf(stderr, "ASM mismatch: got:"fmt", expected:"fmt"\n", ret, expecte d); \
48 speex_assert(expected == ret); \
49 } \
50 } while(0)
51
52 #endif
OLDNEW
« no previous file with comments | « libspeexdsp/Makefile.am ('k') | libspeexdsp/resample_neon.h » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld