OpenCL-examples
Simple OpenCL examples for exploiting GPU computing
File Explorer
Download Latest Version (.zip)- add_numbers.c
- add_numbers.cl
- CMakeLists.txt
- Makefile
- README.md
- clbuild.c
- CMakeLists.txt
- cr.cl
- defs.h
- exposure.clh
- main.c
- Makefile
- README.md
- make.sh
- mysum.c
- mysum.cl
- README.md
- cl_compat.h
- FindclRNG.cmake
- clbuild.c
- CMakeLists.txt
- defs.h
- add-numbers.md
- auger.md
- cf4cl.md
- hello-world.md
- julia-set.md
- mandelbrot.md
- n-body.md
- rng.md
- square-array.md
- sum-array.md
- waste.md
- architecture.md
- building.md
- index.md
- project.pbxproj
- CMakeLists.txt
- hello.c
- Makefile
- README.md
- clbuild.c
- CMakeLists.txt
- defs.h
- Makefile
- mandelbrot.c
- mandelbrot.cl
- mandelbrot_serial.c
- README.md
- project.pbxproj
- particles_16k.dat
- particles_24k.dat
- particles_32k.dat
- particles_64k.dat
- particles_80k.dat
- MainMenu.xib
- star.png
- star.raw
- nbody_cpu.ocl
- nbody_gpu.ocl
- CGBitmap.h
- CGBitmap.mm
- CFCPUHostInfo.h
- CFCPUHostInfo.mm
- CFProcessorInfoArray.h
- CFProcessorInfoArray.mm
- CFCPULoad.h
- CFCPULoad.mm
- CFDataFile.h
- CFDataFile.mm
- CFFile.h
- CFFile.mm
- NSFile.h
- NSFile.mm
- CTFrame.h
- CTFrame.mm
- CFQueryHardware.h
- CFQueryHardware.mm
- CFQueue.h
- CFQueue.mm
- CFText.h
- CFText.mm
- HUDButton.h
- HUDButton.mm
- HUDMeterImage.h
- HUDMeterImage.mm
- HUDMeterTimer.h
- HUDMeterTimer.mm
- CMNumerics.h
- CMNumerics.mm
- CMRandom.h
- CMRandom.mm
- NBodyConstants.h
- NBodyEngine.h
- NBodyEngine.mm
- NBodyPreferences.h
- NBodyPreferences.mm
- NBodySimulationBase.h
- NBodySimulationBase.mm
- NBodySimulationCPU.h
- NBodySimulationCPU.mm
- NBodySimulationDataCopier.h
- NBodySimulationDataCopier.mm
- NBodySimulationDataGalaxy.h
- NBodySimulationDataGalaxy.mm
- NBodySimulationDataMediator.h
- NBodySimulationDataMediator.mm
- NBodySimulationDataPacked.h
- NBodySimulationDataPacked.mm
- NBodySimulationDataURDB.h
- NBodySimulationDataURDB.mm
- NBodySimulationDataURDP.h
- NBodySimulationDataURDP.mm
- NBodySimulationDataURDS.h
- NBodySimulationDataURDS.mm
- NBodySimulationDataSplit.h
- NBodySimulationDataSplit.mm
- NBodySimulationGPU.h
- NBodySimulationGPU.mm
- NBodySimulationProperties.h
- NBodySimulationProperties.mm
- NBodySimulationProperties.plist
- NBodySimulationFacade.h
- NBodySimulationFacade.mm
- NBodySimulationMediator.h
- NBodySimulationMediator.mm
- NBodyButton.h
- NBodyButton.mm
- NBodyButtons.h
- NBodyButtons.mm
- NBodyMeter.h
- NBodyMeter.mm
- NBodyMeters.h
- NBodyMeters.mm
- NBodySimulationVisualizer.h
- NBodySimulationVisualizer.mm
- GLContainers.h
- GLMConstants.h
- GLMConstants.mm
- GLMSizes.h
- GLMSizes.mm
- GLMTransforms.h
- GLMTransforms.mm
- GLUProgram.h
- GLUProgram.mm
- GLUQuad.h
- GLUQuad.mm
- GLUQuery.h
- GLUQuery.mm
- GLUText.h
- GLUText.mm
- GLUTexture.h
- GLUTexture.mm
- GLUGaussian.h
- GLUGaussian.mm
- main.m
- OpenCL_NBody_Simulation-Info.plist
- nbody.fsh
- nbody.gsh
- nbody.vsh
- star.fsh
- star.vsh
- OpenGLView.h
- OpenGLView.mm
- GalaxyIcon.icns
- LICENSE.txt
- README.md
- UserInterfaceState.xcuserstate
- contents.xcworkspacedata
- qjulia.xcscheme
- xcschememanagement.plist
- project.pbxproj
- CMakeLists.txt
- Makefile
- qjulia.c
- qjulia_kernel.cl
- README.md
- CMakeLists.txt
- device.c
- host.c
- kernel.cl
- Makefile
- README.md
- clbuild.c
- CMakeLists.txt
- defs.h
- Makefile
- README.md
- square.c
- square.cl
- square_serial.c
- CMakeLists.txt
- Makefile
- README.md
- vecAdd.c
- vecAdd.cl
- clbuild.c
- CMakeLists.txt
- defs.h
- Makefile
- waste.c
- waste.cl
- waste_serial.c
- CLAUDE.md
- CMakeLists.txt
- mkdocs.yml
- README.md
# Installation Guide
1. Get the code
git clone https://github.com/rsnemmen/OpenCL-examples
Downloads the entire project code from GitHub to your computer.
cd OpenCL-examples
Moves into the project folder you just downloaded.
2. Official Install Script
Easy RecommendedPrerequisites
- Homebrew A package manager for macOS/Linux.
brew install clinfo
Installs the pre-built package via Homebrew β no source build required.
After installing, open a new terminal and run the program's version command (e.g. --version) to confirm it worked.
Pulled directly from this repo's README.
3. CMake
MediumPrerequisites
cmake ..
Analyzes the source code and generates build configuration files (must be run inside the build folder).
Check that an executable was created inside the build folder, then run it directly (e.g. ./build/app_name).
Pulled directly from this repo's README.
4. Make
MediumPrerequisites
- Git Needed to download the project code from GitHub.
- Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make
Compiles the code based on the generated build configuration to produce an executable.
If it finishes without errors, it worked. Try running the generated executable directly.
Pulled directly from this repo's README.
// repository documentation
Was this content helpful?
(0 ratings)
