amino  1.0-beta2
Lightweight Robot Utility Library
debug.h File Reference

Go to the source code of this file.


#define AA_DUMP_MAT(file, fmt, A, m, n)
 Print a matrix. More...


AA_API void aa_hard_assert (int test, const char fmt[],...)
 bail out if test is false
AA_API void aa_verbf (int min_level, const char fmt[],...) AA_DEPRECATED
 don't use
AA_API void aa_dump_vec (FILE *file, const double *v, size_t n)
 print a vec to file
AA_API void aa_dump_mat (FILE *file, const double *A, size_t m, size_t n)
 print a matrix to file
AA_API void aa_dump_matf (FILE *file, const float *A, size_t m, size_t n)
 Print matrix to file.
AA_API void aa_tick (const char fmt[],...)
 save time, printf fmt
AA_API struct timespec aa_tock (void)
 print and return elapsed time since aa_tick()


AA_EXTERN const char *aa_verbf_prefix AA_DEPRECATED
 don't use

Macro Definition Documentation


#define AA_DUMP_MAT (   file,
{ \
for( size_t aa_debug_$_i = 0; aa_debug_$_i < m; \
aa_debug_$_i ++ ) { \
for( size_t aa_debug_$_j = 0; aa_debug_$_j < n-1; \
aa_debug_$_j ++ ) { \
fprintf(file, fmt"\t", \
AA_MATREF(A, m, aa_debug_$_i,aa_debug_$_j)); \
} \
fprintf(file, fmt"\n", \
AA_MATREF(A, m, aa_debug_$_i, n-1) ); \
} \
} \
#define AA_MATREF(A, lda, row, col)
Reference an element in a column-major matrix.
Definition: math.h:348

Print a matrix.

fileFILE pointer to print to
fmtformat specifier for matrix element, ie. "%f" or "%d"
Apointer to matrix, column major
mmatrix rows
nmatrix cols

Definition at line 80 of file debug.h.