Project Ne10
An Open Optimized Software Library Project for the ARM Architecture
Loading...
Searching...
No Matches
NE10_fft_debug_macro.h
1/*
2 * Copyright 2014-15 ARM Limited and Contributors.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of ARM Limited nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY ARM LIMITED AND CONTRIBUTORS "AS IS" AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28/*
29 * NE10 Library : dsp/NE10_fft_debug_macro.h
30 */
31
32#include "NE10_types.h"
33
34#ifndef NE10_FFT_DEBUG_MACRO_H
35#define NE10_FFT_DEBUG_MACRO_H
36
37#ifdef PERFORMANCE_TEST
38#undef NE10_VERBOSE
39#endif
40
41#ifdef NE10_VERBOSE
42
43#define PRINT_STAGE_INFO \
44 do { \
45 fprintf( stdout, "%s,%d \n \t:f,m,n=%d,%d,%d \n", __FUNCTION__, __LINE__, fstride, mstride, nfft ); \
46 } while (0)
47
48#define PRINT_POINTERS_INFO(IN,OUT,BUF,TW) \
49 do { \
50 fprintf( stdout, "%s,%d \t:" "IN:%p \t" "OUT:%p \t" "BUF:%p \t" "TW:%p \n", \
51 __FUNCTION__, __LINE__, IN, OUT, BUF, TW); \
52 } while (0)
53
54#define PRINT_BUTTERFLY_INFO ;
55
56#define PRINT_HIT \
57 do { \
58 fprintf( stderr, "HIT %s:%d \n", __FUNCTION__, __LINE__); \
59 } while (0)
60
61#define PRINT_VAR(X,FORM) \
62 do { \
63 fprintf( stderr, #X "=" FORM " \n", X ); \
64 } while (0)
65
66#define RFORM " \t%+8.4e \t"
67
68#define CFORM "(" RFORM "," RFORM ") \t"
69
70#define NE10_PRINT_Q_VECTOR(Q_VECTOR) \
71 do { \
72 fprintf(stderr,"inside %s \n", __FUNCTION__ ); \
73 fprintf(stderr, #Q_VECTOR " \n"); \
74 fprintf(stderr, RFORM RFORM RFORM RFORM " \n", \
75 Q_VECTOR[0], Q_VECTOR[1], Q_VECTOR[2], Q_VECTOR[3] ); \
76 } while (0)
77
78#define NE10_PRINT_Q2_VECTOR(Q2_VECTOR) \
79 do { \
80 fprintf(stderr,"inside %s \n", __FUNCTION__ ); \
81 fprintf(stderr, #Q2_VECTOR " \n"); \
82 fprintf(stderr,"REAL:" RFORM RFORM RFORM RFORM " \n", \
83 Q2_VECTOR[0].r, Q2_VECTOR[1].r, Q2_VECTOR[2].r, Q2_VECTOR[3].r ); \
84 fprintf(stderr,"IMAG:" RFORM RFORM RFORM RFORM " \n", \
85 Q2_VECTOR[0].i, Q2_VECTOR[1].i, Q2_VECTOR[2].i, Q2_VECTOR[3].i ); \
86 } while (0)
87#else // NE10_VERBOSE
88
89#define PRINT_STAGE_INFO ;
90#define PRINT_BUTTERFLY_INFO ;
91#define PRINT_HIT ;
92#define PRINT_VAR(X,FORM) ;
93#define PRINT_POINTERS_INFO(IN,OUT,BUF,TW) ;
94#define NE10_PRINT_Q_VECTOR(Q_VECTOR) ;
95#define NE10_PRINT_Q2_VECTOR(Q2_VECTOR) ;
96
97#endif // NE10_VERBOSE
98
99#endif // NE10_FFT_DEBUG_MACRO_H