rs_debug.rsh revision 044e2ee36ffe6520570a7f0207d75a8fce8b8e91
1/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/** @file rs_debug.rsh
18 *  \brief Utility debugging routines
19 *
20 *  Routines intended to be used during application developement.  These should
21 *  not be used in shipping applications.  All print a string and value pair to
22 *  the standard log.
23 *
24 */
25
26#ifndef __RS_DEBUG_RSH__
27#define __RS_DEBUG_RSH__
28
29
30
31/**
32 * Debug function.  Prints a string and value to the log.
33 */
34extern void __attribute__((overloadable))
35    rsDebug(const char *, float);
36/**
37 * Debug function.  Prints a string and value to the log.
38 */
39extern void __attribute__((overloadable))
40    rsDebug(const char *, float, float);
41/**
42 * Debug function.  Prints a string and value to the log.
43 */
44extern void __attribute__((overloadable))
45    rsDebug(const char *, float, float, float);
46/**
47 * Debug function.  Prints a string and value to the log.
48 */
49extern void __attribute__((overloadable))
50    rsDebug(const char *, float, float, float, float);
51/**
52 * Debug function.  Prints a string and value to the log.
53 */
54extern void __attribute__((overloadable))
55    rsDebug(const char *, double);
56/**
57 * Debug function.  Prints a string and value to the log.
58 */
59extern void __attribute__((overloadable))
60    rsDebug(const char *, const rs_matrix4x4 *);
61/**
62 * Debug function.  Prints a string and value to the log.
63 */
64extern void __attribute__((overloadable))
65    rsDebug(const char *, const rs_matrix3x3 *);
66/**
67 * Debug function.  Prints a string and value to the log.
68 */
69extern void __attribute__((overloadable))
70    rsDebug(const char *, const rs_matrix2x2 *);
71/**
72 * Debug function.  Prints a string and value to the log.
73 */
74extern void __attribute__((overloadable))
75    rsDebug(const char *, int);
76/**
77 * Debug function.  Prints a string and value to the log.
78 */
79extern void __attribute__((overloadable))
80    rsDebug(const char *, uint);
81/**
82 * Debug function.  Prints a string and value to the log.
83 */
84extern void __attribute__((overloadable))
85    rsDebug(const char *, long);
86/**
87 * Debug function.  Prints a string and value to the log.
88 */
89extern void __attribute__((overloadable))
90    rsDebug(const char *, unsigned long);
91/**
92 * Debug function.  Prints a string and value to the log.
93 */
94extern void __attribute__((overloadable))
95    rsDebug(const char *, long long);
96/**
97 * Debug function.  Prints a string and value to the log.
98 */
99extern void __attribute__((overloadable))
100    rsDebug(const char *, unsigned long long);
101/**
102 * Debug function.  Prints a string and value to the log.
103 */
104extern void __attribute__((overloadable))
105    rsDebug(const char *, const void *);
106#define RS_DEBUG(a) rsDebug(#a, a)
107#define RS_DEBUG_MARKER rsDebug(__FILE__, __LINE__)
108
109
110/**
111 * Debug function.  Prints a string and value to the log.
112 */
113_RS_RUNTIME void __attribute__((overloadable)) rsDebug(const char *s, float2 v);
114/**
115 * Debug function.  Prints a string and value to the log.
116 */
117_RS_RUNTIME void __attribute__((overloadable)) rsDebug(const char *s, float3 v);
118/**
119 * Debug function.  Prints a string and value to the log.
120 */
121_RS_RUNTIME void __attribute__((overloadable)) rsDebug(const char *s, float4 v);
122
123#endif
124