Giter Club home page Giter Club logo

clic_prototype's Introduction

CI-Build CI-Tests Codecov License Website GitHub stars GitHub forks

CLIc

CLIc is a prototype for CLesperanto - a multi-language framework for GPU-accelerated image processing. It uses OpenCL kernels from CLIJ

It is a preliminary projet and mainly focussed on running a few kernel using the OpenCL C++ API from Khronos.

Usage example

#include "clesperanto.h"  // CLIc include

int main( int argc, char** argv)
{
    // Initialisation of clEsperanto with default device
    cle::Clesperanto cle;

    // store data to process in vector
    std::array<size_t,3> dimensions = {width, height, depth};
    std::vector<float> data (width * height * depth); 

    /*
     * ... fill input with data to process  
     */

    // push data from host to device
    auto gpu_src = cle.Push<float>(data, dimensions);
    // allocate space on device
    auto gpu_dst = cle.Create<float>(dimensions);
    // apply filter with parameters
    cle.AddImageAndScalar(gpu_src, gpu_dst, 10);
    // pull output from device to host
    auto output = cle.Pull<float>(gpu_dst); 

    return EXIT_SUCCESS;
}

See more complete example on usage by looking at the kernels tests.

Installation

Requirements

CLIc rely on OpenCL language for parallelisation and CMake for configuration and build.
Follow the installation guide for helps on compilation and installation.

Quick install

Clone the repository and update the submodules

git clone [email protected]:clEsperanto/CLIc_prototype.git CLIc
cd CLIc && git submodule update --init --recursive

Create a build folder and configure cmake to generate the adapted makefile. Then compile the library and install it at specified location on your system.

cmake -S . -B ./build -D CMAKE_INSTALL_PREFIX=/path/to/installation/folder
cmake --build ./build --parallel 10 --target install

You can modify installation location using -D CMAKE_INSTALL_PREFIX=/path/to/installation/folder.

CLIc can be uninstall by running the following command

cmake --build ./build --target uninstall

Kernels

CLIc filters rely on the clEsperanto branch of CLIj OpenCL kernels.

Feedback welcome!

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.

clic_prototype's People

Contributors

4pp-engine avatar aaron-bray avatar haesleinhuepf avatar strigaud avatar tbirdso avatar thewtex avatar tropf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.