diff options
author | Meng Mengmeng <mengmeng.meng@intel.com> | 2015-11-20 06:25:54 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2015-11-25 11:59:04 +0800 |
commit | 92311916a7c82f2d14fe33226333bc6583a4698f (patch) | |
tree | 8323d1ff2a99f8cba366e068eecca8daf952fbab /benchmark | |
parent | e75321facfc5e68f1197eeff9a3a0ff4e192760e (diff) |
Add a benchmark which test do 3*3 median filter in buffer.
It's basic buffer test for uchar, ushort and uint.
Signed-off-by: Meng Mengmeng <mengmeng.meng@intel.com>
Reviewed-by: Ruiling Song <ruiling.song@intel.com>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/benchmark_copy_buffer.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/benchmark/benchmark_copy_buffer.cpp b/benchmark/benchmark_copy_buffer.cpp index 93bf1b68..6cf3023c 100644 --- a/benchmark/benchmark_copy_buffer.cpp +++ b/benchmark/benchmark_copy_buffer.cpp @@ -1,8 +1,8 @@ #include "utests/utest_helper.hpp" #include <sys/time.h> -#define BENCH_COPY_BUFFER(T, K, M) \ -double benchmark_copy_buffer_ ##T(void) \ +#define BENCH_COPY_BUFFER(J, T, K, M) \ +double benchmark_ ##J ##_buffer_ ##T(void) \ { \ struct timeval start,stop; \ \ @@ -48,8 +48,11 @@ double benchmark_copy_buffer_ ##T(void) \ return (double)(1000 / (elapsed * 1e-3)); \ } \ \ -MAKE_BENCHMARK_FROM_FUNCTION_KEEP_PROGRAM(benchmark_copy_buffer_ ##T, true, "FPS"); +MAKE_BENCHMARK_FROM_FUNCTION_KEEP_PROGRAM(benchmark_ ##J ##_buffer_ ##T, true, "FPS"); -BENCH_COPY_BUFFER(uchar,"bench_copy_buffer_uchar",unsigned char) -BENCH_COPY_BUFFER(ushort,"bench_copy_buffer_ushort",unsigned short) -BENCH_COPY_BUFFER(uint,"bench_copy_buffer_uint",unsigned int) +BENCH_COPY_BUFFER(copy, uchar, "bench_copy_buffer_uchar", unsigned char) +BENCH_COPY_BUFFER(copy, ushort, "bench_copy_buffer_ushort", unsigned short) +BENCH_COPY_BUFFER(copy, uint, "bench_copy_buffer_uint", unsigned int) +BENCH_COPY_BUFFER(filter, uchar, "bench_filter_buffer_uchar", unsigned char) +BENCH_COPY_BUFFER(filter, ushort, "bench_filter_buffer_ushort", unsigned short) +BENCH_COPY_BUFFER(filter, uint, "bench_filter_buffer_uint", unsigned int) |