[PATCH] D49341: [test-suite] Added Image Processing Kernels Using Benchmark Library: Blur Algorithms

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 3 11:32:05 PDT 2018


Meinersbur added inline comments.


================
Comment at: MicroBenchmarks/ImageProcessing/Blur/boxBlurKernel.cpp:10-11
+#include <cstdlib>
+void boxBlurKernel(int *inpImage,
+                   int *outImage, int height, int width) {
+
----------------
Can you change `inpImage`/`outImage` to use C99 array parameter syntax?


================
Comment at: MicroBenchmarks/ImageProcessing/Blur/main.cpp:175-177
+  if (state.range(0) == 20) {
+    saveImage(outputImage, (const char *)"testFailed.txt", height, width);
+  }
----------------
dberris wrote:
> Meinersbur wrote:
> > @dberris Would `::benchmark::ClobberMemory()` be a viable alternative?
> It may be.
I suggest to leave it as is for the moment. If we found a canonical approach, we can change this and the other benchmarks afterwards.

Could you add a comment that this is supposed keep the compiler to optimize the computation away?


https://reviews.llvm.org/D49341





More information about the llvm-commits mailing list