[PATCH] D47675: [test-suite][RFC] Using Google Benchmark Library on Harris Kernel

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 11 15:54:07 PDT 2018


Meinersbur added a comment.

Looks great. Did you do a performance comparison with/without Polly?

[suggestion] Even though Google Benchmark by default does not run kernels in multiple threads, it might be a good idea to prepare for it. That is, no global shared `img` array.

[comment] Is there are a reason why the `init.cpp` and `main.cpp` are are separate files?



================
Comment at: MicroBenchmarks/harris/harris.h:33
+void init_checkboard_image(int height, int width); // Initialize a checkboard image
+void DUMP_IMAGE(int height, int width, float img[(2+HEIGHT)][2+WIDTH]);
+void harris_kernel(int R, int C, float threshold, float img[(2+HEIGHT)][2+WIDTH]);
----------------
[style] `DUMP_IMAGE` is named like a macro, but is a function.


================
Comment at: MicroBenchmarks/harris/harris_kernel.cpp:118
+  }
+  return;
+}
----------------
[style] `return` before the end of the function seem unnecessary.


Repository:
  rT test-suite

https://reviews.llvm.org/D47675





More information about the llvm-commits mailing list