{"id":13418793,"url":"https://github.com/Gladdy/EasyOpenCL","last_synced_at":"2025-03-15T04:30:40.508Z","repository":{"id":33058640,"uuid":"36695111","full_name":"Gladdy/EasyOpenCL","owner":"Gladdy","description":"The easiest way to get started with OpenCL!","archived":false,"fork":false,"pushed_at":"2015-09-06T10:22:42.000Z","size":2974,"stargazers_count":307,"open_issues_count":0,"forks_count":15,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-07-31T22:44:04.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gladdy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-01T23:28:00.000Z","updated_at":"2024-07-30T00:41:55.000Z","dependencies_parsed_at":"2022-09-12T17:23:10.375Z","dependency_job_id":null,"html_url":"https://github.com/Gladdy/EasyOpenCL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gladdy%2FEasyOpenCL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gladdy%2FEasyOpenCL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gladdy%2FEasyOpenCL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gladdy%2FEasyOpenCL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gladdy","download_url":"https://codeload.github.com/Gladdy/EasyOpenCL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221536610,"owners_count":16839538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:07.166Z","updated_at":"2025-03-15T04:30:40.502Z","avatar_url":"https://github.com/Gladdy.png","language":"C++","funding_links":[],"categories":["TODO scan for Android support in followings","OpenCL","[Libraries](#contents)"],"sub_categories":["Libraries","OpenCL - Wrappers"],"readme":"## EasyOpenCL\n#### No exposed low-level C, just the C++ standard library\n\n### Features\n* Focus on programming the GPU instead of messing about with long C-style OpenCL function calls and manual memory management.\n* CMake support for Linux and Mac - No more linking problems when you have installed the correct driver.\n* Support for scalar values: pass additional structs to your kernel, eg. transformation matrices or custom constants.\n* Chain kernels together in order to create a true pipeline on your GPU in which kernels can depend on multiple others. (`example/main.cpp`)\n* Human readable OpenCL errors for easy debugging and teaching of the OpenCL basics.\n\n### Overview: it's this easy!\n```cpp\n// example/simple.cpp\ntry {\n  EasyOpenCL\u003cfloat\u003e framework (SHOW_DEBUG);\n  \n  //Register the kernel with the framework\n  auto\u0026 square = framework.load(\"squarefloat\");\n  \n  //Bind the input buffer (initial values from a std::vector) and the output buffer\n  square.bindInput(0, std::vector\u003cfloat\u003e { 1.1, 2.2, 3.3, 4.4, 5.5, 11.0 });\n  square.bindOutput(1);\n  \n  //Evaluate the kernel and display the output\n  square.evaluate();\n  square.showBuffer(1); // [ 1.21, 4.84, 10.89, 19.36, 30.25, 121 ]\n} catch (std::exception\u0026 e) { std::cerr \u003c\u003c \"Error: \" \u003c\u003c e.what() \u003c\u003c std::endl; }\n```\n```c\n// kernels/squarefloat.cl\n__kernel void squarefloat(__global float* input, __global float* output)\n{\n  int i = get_global_id(0);\n  output[i] = input[i] * input[i];\n}\n\n```\n\n### Getting started\nAll platforms:\n* Update your graphics drivers\n* Install the drivers with OpenCL support (NVIDIA CUDA Toolkit, AMD APP SDK or Intel OpenCL™ Code Builder)\n\n```\ngit clone https://github.com/Gladdy/EasyOpenCL.git\ncd EasyOpenCL\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake\n./simple\n```\n\n### TODO:\n* High priority\n  * More examples - image processing, deep learning (matrix operations) and a renderer/raytracer\n  * Asynchronous kernel calls + benchmarks of asynchronous vs synchronous kernel calls\n  * Cleaning up the framework, getting public/private right + the different constructors\n\n* Low priority:\n  * Automatic generation of local and global work group sizes\n  * Detect circular dependencies of kernels\n\n* Mehh whenever I have the time:\n  * .dot output of your current kernel dependency graph \n  * Automatic generation of stub kernel (.cl) files based on the kernel links specified.\n  \n### Thanks to:\n* Dhruba Bandopadhyay: [OpenCL Cookbook: Listing all devices and their critical attributes](http://dhruba.name/2012/08/14/opencl-cookbook-listing-all-devices-and-their-critical-attributes/)\n* elhigu: [cmake-findopencl](https://github.com/elhigu/cmake-findopencl)\n* Tom Scogland: [OpenCL error checking](http://tom.scogland.com/blog/2013/03/29/opencl-errors/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGladdy%2FEasyOpenCL","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGladdy%2FEasyOpenCL","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGladdy%2FEasyOpenCL/lists"}