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

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 15 17:29:42 PDT 2018


dberris added inline comments.


================
Comment at: MicroBenchmarks/ImageProcessing/Blur/blur.h:15-18
+void meanFilterBlurKernel(int inputImage[HEIGHT][WIDTH],
+                   int outputImage[HEIGHT][WIDTH], int height, int width);
+void gaussianBlurKernel(int inputImage[HEIGHT][WIDTH],
+                        int outputImage[HEIGHT][WIDTH], int height, int width);
----------------
Do these functions need the array sizes at all? Why not just use `int **`?


================
Comment at: MicroBenchmarks/ImageProcessing/Blur/main.cpp:167
+  int width = state.range(1);
+  gaussianBlurKernel(*inputImage, *outputImage, height, width);
+
----------------
You probably want a `::benchmark::DoNotOptimize(...)` around this and other calls to the kernel.


Repository:
  rT test-suite

https://reviews.llvm.org/D49341





More information about the llvm-commits mailing list