Home | History | Annotate | Download | only in scriptc
      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  */
     34 extern void __attribute__((overloadable))
     35     rsDebug(const char *, float);
     36 /**
     37  * Debug function.  Prints a string and value to the log.
     38  */
     39 extern void __attribute__((overloadable))
     40     rsDebug(const char *, float, float);
     41 /**
     42  * Debug function.  Prints a string and value to the log.
     43  */
     44 extern void __attribute__((overloadable))
     45     rsDebug(const char *, float, float, float);
     46 /**
     47  * Debug function.  Prints a string and value to the log.
     48  */
     49 extern void __attribute__((overloadable))
     50     rsDebug(const char *, float, float, float, float);
     51 /**
     52  * Debug function.  Prints a string and value to the log.
     53  */
     54 extern void __attribute__((overloadable))
     55     rsDebug(const char *, double);
     56 /**
     57  * Debug function.  Prints a string and value to the log.
     58  */
     59 extern void __attribute__((overloadable))
     60     rsDebug(const char *, const rs_matrix4x4 *);
     61 /**
     62  * Debug function.  Prints a string and value to the log.
     63  */
     64 extern void __attribute__((overloadable))
     65     rsDebug(const char *, const rs_matrix3x3 *);
     66 /**
     67  * Debug function.  Prints a string and value to the log.
     68  */
     69 extern void __attribute__((overloadable))
     70     rsDebug(const char *, const rs_matrix2x2 *);
     71 /**
     72  * Debug function.  Prints a string and value to the log.
     73  */
     74 extern void __attribute__((overloadable))
     75     rsDebug(const char *, int);
     76 /**
     77  * Debug function.  Prints a string and value to the log.
     78  */
     79 extern void __attribute__((overloadable))
     80     rsDebug(const char *, uint);
     81 /**
     82  * Debug function.  Prints a string and value to the log.
     83  */
     84 extern void __attribute__((overloadable))
     85     rsDebug(const char *, long);
     86 /**
     87  * Debug function.  Prints a string and value to the log.
     88  */
     89 extern void __attribute__((overloadable))
     90     rsDebug(const char *, unsigned long);
     91 /**
     92  * Debug function.  Prints a string and value to the log.
     93  */
     94 extern void __attribute__((overloadable))
     95     rsDebug(const char *, long long);
     96 /**
     97  * Debug function.  Prints a string and value to the log.
     98  */
     99 extern void __attribute__((overloadable))
    100     rsDebug(const char *, unsigned long long);
    101 /**
    102  * Debug function.  Prints a string and value to the log.
    103  */
    104 extern 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