[PATCH] D49503: [test-suite] Added Image Processing Kernels Using Benchmark Library: Dither Algorithms
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 26 19:51:44 PDT 2018
Meinersbur added inline comments.
================
Comment at: MicroBenchmarks/ImageProcessing/Dither/floydDitherKernel.cpp:9
+#include "dither.h"
+void floydDitherKernel(int *inpImage, int *outImage, int height, int width) {
+
----------------
This file does not use C++ features, so you can use C99 variable length array parameters.
================
Comment at: MicroBenchmarks/ImageProcessing/Dither/floydDitherKernel.cpp:43
+
+ int temp1 = ((*outputImage)[i][j + 1] + a);
+ if (temp1 > 255) {
----------------
`temp1` is only used in the else case. No need to read the outputImage in all cases.
https://reviews.llvm.org/D49503
More information about the llvm-commits
mailing list