Evaluation of different filter operations and different storage types (image, cube, buffer, image buffer) in OpenCL. This is the repository for two corresponding blog articles:
- Performance evaluation of image convolution with gradient filters in OpenCL: assesses the performance of filter operations implemented in different ways.
- Buffer vs. image performance for applying filters to an image pyramid in OpenCL: focuses on different storage types which are best suited for an image pyramid.
- Install Visual Studio 2015
- Install OpenCV (e.g. like described in this article)
- Install the Intel SDK for OpenCL
- Build and run the solution
- Start point is the file main.cpp where you can switch between the different image types and set other test settings
- Use
test(pyramid)
to test if the implementation works without running any performance tests - Use
testBatch(pyramid);
to start the performance tests
The OpenCL kernel code which implements the filters is generated via a Perl script. Running this script (run generate_kernels.pl
in the kernels
folder) uses the .base
files as basis and generates all different filter sizes as well as single, double and predefined filters. The generated files are included in the filter_images.cl
file (when using the image2d_t
data type) which is passed to the OpenCL runtime.