report.h
来自「傅立叶变换和小波变换是图像压缩的重要工具。该代大戏是利用小波变换进行图像压缩。」· C头文件 代码 · 共 48 行
H
48 行
#ifndef REPORT_H
#define REPORT_H
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef DO_REPORT //}{
//#pragma message(" PASS THIS AS A PARAMETER TO REPORT")
extern FILE * reportFP;
#pragma message("report ON")
void Report_DoReport(const char * str,int count,double tot,double totsqr);
#define REPORT_VARS(var) static int count_##var =0; static double tot_##var = 0.0, totsqr_##var = 0.0;
#define REPORT_RESET(var) do { count_##var =0; tot_##var = totsqr_##var = 0.0; } while(0)
#define REPORT_ADD(var) do { count_##var ++; tot_##var += (double)(var); totsqr_##var += (double)(var)*(var); } while(0)
#define REPORT_REPORT(var) Report_DoReport(#var,count_##var,tot_##var,totsqr_##var)
#define REPORT(x) x
#else //}{
#pragma message("report OFF")
#define REPORT_VARS(var)
#define REPORT_RESET(var)
#define REPORT_ADD(var)
#define REPORT_REPORT(var)
#define REPORT(x)
#endif //}{
#ifdef __cplusplus
}
#endif
#endif // REPORT_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?