35 #include "DBaseImage.h"
39 #define BENCH(func, ...) \
43 for (UINT i=0;i<BENCH_NRUNS;i++) \
46 cout << #func << "\t" << displayTime((t2-t1)/BENCH_NRUNS) << endl; \
49 #define BENCH_STR(func, str, ...) \
53 for (UINT i=0;i<BENCH_NRUNS;i++) \
56 cout << #func << " " << str << "\t" << displayTime((t2-t1)/BENCH_NRUNS) << endl; \
59 #define BENCH_IMG(func, ...) \
63 for (UINT i=0;i<BENCH_NRUNS;i++) \
66 cout << #func << "\t" << GET_1ST_ARG(__VA_ARGS__).getTypeAsString() << "\t"; \
67 cout << GET_1ST_ARG(__VA_ARGS__).getWidth() << "x" << GET_1ST_ARG(__VA_ARGS__).getHeight(); \
68 if (GET_1ST_ARG(__VA_ARGS__).getDepth()>UINT(1)) cout << "x" << GET_1ST_ARG(__VA_ARGS__).getDepth(); \
69 cout << "\t" << displayTime((t2-t1)/BENCH_NRUNS) << endl; \
72 #define BENCH_CROSS_IMG(func, ...) \
76 for (UINT i=0;i<BENCH_NRUNS;i++) \
79 cout << #func << "\t" << GET_1ST_ARG(__VA_ARGS__).getTypeAsString() << "-" << GET_2ND_ARG(__VA_ARGS__).getTypeAsString() << "\t"; \
80 cout << GET_1ST_ARG(__VA_ARGS__).getWidth() << "x" << GET_1ST_ARG(__VA_ARGS__).getHeight(); \
81 if (GET_1ST_ARG(__VA_ARGS__).getDepth()>UINT(1)) cout << "x" << GET_1ST_ARG(__VA_ARGS__).getDepth(); \
82 cout << "\t" << displayTime((t2-t1)/BENCH_NRUNS) << endl; \
85 #define BENCH_IMG_STR(func, str, ...) \
89 for (UINT i=0;i<BENCH_NRUNS;i++) \
92 cout << #func << " " << str << "\t" << GET_1ST_ARG(__VA_ARGS__).getTypeAsString() << "\t"; \
93 cout << GET_1ST_ARG(__VA_ARGS__).getWidth() << "x" << GET_1ST_ARG(__VA_ARGS__).getHeight(); \
94 if (GET_1ST_ARG(__VA_ARGS__).getDepth()>1) cout << "x" << GET_1ST_ARG(__VA_ARGS__).getDepth(); \
95 cout << "\t" << displayTime((t2-t1)/BENCH_NRUNS) << endl; \