kpvdebug.h revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
#ifndef _KPVDEBUG_H
#define _KPVDEBUG_H 1
#ifdef DEBUG
#ifndef __LINE__
#define __LINE__ 0
#endif
#ifndef __FILE__
#define __FILE__ "Unknown"
#endif
{
char buf[1024];
abort();
}
#include <sys/resource.h>
static double _getTime ( void )
{ double tm;
struct rusage u;
getrusage ( RUSAGE_SELF, &u );
return tm;
}
static double _Kpvtime;
#define COUNT(n) ((n) += 1)
#define TALLY(c,n,v) ((c) ? ((n) += (v)) : (n))
#define DECLARE(t,v) t v
#define SET(n,v) ((n) = (v))
#else
#define BEGTIME()
#define GETTIME()
#define ASSERT(p)
#define COUNT(n)
#define TALLY(c,n,v)
#define DECLARE(t,v)
#define SET(n,v)
#define KPV(x)
#define RETURN(x) return(x)
#define BREAK break
#endif /*DEBUG*/
#endif /*_KPVDEBUG_H*/