CLIc is a prototype for CLesperanto - a multi-language framework for GPU-accelerated image processing. It uses OpenCL kernels from CLIJ
Right now, this is very preliminary, and mainly focussed on running a few kernel using the OpenCL C++ API.
#include "CLE.h" // CLIc include
int main( int argc, char** argv)
{
cle::GPU gpu(); // Initialise GPU
cle::CLE cle(gpu); // Initialise cle
// store data to process in vector
unsigned int dimensions[3] = {width, height, depth};
std::vector<float> input [width * height * depth];
/*
* ... fill input with data to process
*/
// push data into GPU, and create the output into GPU
cle::Buffer src = cle.Push<float>(input, dimensions);
// create output GPU object and apply filter
cle::Buffer dst = cle.Create<float>(dimensions);
cle.AddImageAndScalar(src, dst, 10);
// get output from filter into vector
Image<float> output = cle.Pull<float>(dst);
return EXIT_SUCCESS;
}
See more complete example on usage by looking at the validation tests.
Guideline for installation requirements and troubleshooting here.
Compiled API available for Windows 10, MaxOS 10.14 and newer, and Ubuntu 18.04 available here.
See compilation guide for installation from source.
CLIc rely on the CLIj OpenCL kernels. They are required for the proper execution of CLIc API. Make sure you are downloading the repository submodule, or update the kernels folder directory variable during the CMake configuration to point to the kernels location.
clEsperanto is developed in the open because we believe in the open source community. Feel free to drop feedback as github issue or via image.sc
CMake library configuration extended from cmake-example-library by Pablo Speciale