Skip to content

Arief-AK/OpenCL-Development

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCL-Development

Development of OpenCL applications using OpenCL specification. This project utilises the CMake framework to allow cross-platform development.

Structure

└── 📁OpenCL-Development
    └── 📁include
        └── 📁CL                    # OpenCL headers
    └── 📁src
        └── 📁HelloWorld
            └── CMakeLists.txt
            └── HelloWorld.cl
            └── HelloWorld.cpp
        └── 📁 ..                   # Other OpenCL applications
        └── CMakelists.txt
    └── .gitignore
    └── CMakeLists.txt
    └── README.md

OpenCL setup

OpenCL is typically packaged with graphic drivers from vendors like AMD, Intel, and NVIDIA. To ensure that OpenCL is properly installed on your system, install the latest graphic drivers on your device.

Linux

On Linux machines, it is recommended to install the ocl-icd-opencl-dev package

sudo apt-get install ocl-icd-opencl-dev

Setup

Note

Ensure that CMake is properly installed and added to the PATH environment variable on your machine. See CMake official documentation.

This project is developed using visual studio code IDE. The CMake Tools extension is used extensively within the project development. It is highly recommended that users develop with VS code with this extension.

Windows

  1. Within the root directory of the project, build the project using CMake. In this example, the Debug configuration is used and option to not build 2DImageFilter application is set (Due to external dependencies required). See Installing FreeImage library on Windows.
mkdir build
cmake -S . -B build -DBUILD_2D_IMAGE_FILTER=OFF
cmake --build build --config Debug
  1. Head to the application and run. For example, the HelloWorld application
cd .\src\HelloWorld\Debug
.\HelloWorld.exe

Linux

  1. Within the root directory of the project, build the project using CMake. The option to not build 2DImageFilter application is set here as well. See Installing FreeImage library on Linux.
mkdir build
cmake -S . -B build -DBUILD_2D_IMAGE_FILTER=OFF
cd build
make
  1. Head to the application and run. For example, the HelloWorld application
cd src/HelloWorld
./HelloWorld

About

Collection of OpenCL applications

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published