mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-03 08:01:25 +08:00
eb3d9eb0c9
Primary changes: * Add an improved cache system to speed up performance. * Fix NCZarr to properly handle scalar variables. Misc. Related Changes: * Added unit tests for extendible hash and for the generic cache. * Add config parameter to set size of the NCZarr cache. * Add initial performance tests but leave them unused. * Add CRC64 support. * Move location of ncdumpchunks utility from /ncgen to /ncdump. * Refactor auth support. Misc. Unrelated Changes: * More cleanup of the S3 support * Add support for S3 authentication in .rc files: HTTP.S3.ACCESSID and HTTP.S3.SECRETKEY. * Remove the hashkey from the struct OBJHDR since it is never used.
71 lines
2.3 KiB
C
71 lines
2.3 KiB
C
/*********************************************************************
|
|
* Copyright 2018, UCAR/Unidata
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
|
*********************************************************************/
|
|
#ifndef ZDEBUG_H
|
|
#define ZDEBUG_H
|
|
|
|
#undef ZDEBUG /* general debug */
|
|
#undef ZDEBUG1 /* detailed debug */
|
|
|
|
#define ZCATCH /* Warning: significant performance impact */
|
|
#undef ZTRACING /* Warning: significant performance impact */
|
|
|
|
#include "ncexternl.h"
|
|
#include "nclog.h"
|
|
|
|
#ifdef ZCATCH
|
|
/* Place breakpoint on zbreakpoint to catch errors close to where they occur*/
|
|
#define THROW(e) zthrow((e),__FILE__,__LINE__)
|
|
#define ZCHECK(e) if((e)) {THROW(stat); goto done;} else {}
|
|
EXTERNL int zbreakpoint(int err);
|
|
EXTERNL int zthrow(int err, const char* fname, int line);
|
|
#else
|
|
#define ZCHECK(e) {if((e)) {goto done;}}
|
|
#define THROW(e) (e)
|
|
#endif
|
|
|
|
#ifdef ZTRACING
|
|
#define ZLOG(level,msg,...) nclog(level,msg,__VA_ARGS__)
|
|
#define ZTRACE(fmt,...) nclog(NCLOGDBG,"trace: %s:%s " fmt,__FILE__,__func__,__VA_ARGS__)
|
|
#else
|
|
#define ZLOG(level,msg,...)
|
|
#define ZTRACE(fmt,...)
|
|
#endif
|
|
|
|
/* printers */
|
|
EXTERNL void nczprint_reclaim(void);
|
|
EXTERNL char* nczprint_slice(NCZSlice);
|
|
EXTERNL char* nczprint_slices(int rank, const NCZSlice*);
|
|
EXTERNL char* nczprint_slab(int rank, const NCZSlice*);
|
|
EXTERNL char* nczprint_odom(const NCZOdometer*);
|
|
EXTERNL char* nczprint_chunkrange(const NCZChunkRange);
|
|
EXTERNL char* nczprint_projection(const NCZProjection);
|
|
EXTERNL char* nczprint_sliceprojections(const NCZSliceProjections);
|
|
EXTERNL char* nczprint_allsliceprojections(int r, const NCZSliceProjections* slp);
|
|
EXTERNL char* nczprint_vector(size_t,const size64_t*);
|
|
EXTERNL char* nczprint_slicex(const NCZSlice slice, int raw);
|
|
EXTERNL char* nczprint_slicesx(int rank, const NCZSlice* slices, int raw);
|
|
EXTERNL char* nczprint_projectionx(const NCZProjection proj, int raw);
|
|
EXTERNL char* nczprint_sliceprojectionsx(const NCZSliceProjections slp, int raw);
|
|
|
|
EXTERNL void zdumpcommon(const struct Common*);
|
|
|
|
#ifdef HAVE_EXECINFO_H
|
|
EXTERNL void NCZbacktrace(void);
|
|
#endif
|
|
|
|
/* Define the possible unit tests (powers of 2) */
|
|
#define UTEST_RANGE 1
|
|
#define UTEST_WALK 2
|
|
#define UTEST_TRANSFER 4
|
|
|
|
struct ZUTEST {
|
|
int tests;
|
|
void (*print)(int sort,...);
|
|
};
|
|
EXTERNL struct ZUTEST* zutest;
|
|
|
|
#endif /*ZDEBUG_H*/
|
|
|