Giter VIP home page Giter VIP logo

intropencl's Introduction

intropencl

An introduction to OpenCL (Lutecia Week 2020 TP39).

Course from https://github.com/amusant/tpt39.

Device

The target was supposed to be an odroid xu4 (with an ARM Mali T628 GPU), but I changed a few things to have it run on my own computer (whose GPU is an Nvidia GTX 1070).

It should run on any nvidia card and any Linux with Nvidia and OpenCL libs installed.

If you want to run it on another device you probably only need to change the libs in the makefile. You can also change the version of C++ used.

Usage

Each subdirectory has a Makefile, running make compiles and run the .cpp file (which itself compiles and run the .cl file).

Hello world

Writes "hello world !", it's mainly just to see how to setup an OpenCL program.

Vector add

Adds two vectors together, compares times between CPU and GPU.

If MAPPED is defined, the memory used is mapped from GPU space to CPU space.

If not, the memory is copied.

Matrix product

Multiplies two matrix together, and compares times between CPU and GPU.

If GROUPS is defined, it uses groups to have cache speedup.

Video filter

Video filtering calculations in GPU (opencv stuff) to modify a video.

In particular write a function to highlight contours in an image and one to blur an image.

You can define GROUPS and MAPPED to use groups and to map memory instead of copy it.

Compare runtimes between OpenCV and home made OpenCL functions.

intropencl's People

Contributors

pgimalac avatar

Watchers

 avatar  avatar

Forkers

afm215

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.