Skip to content

ca-l-eb/gravity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

A simple N-body simulation originally written in C++ using OpenGL for visualization and OpenMP for parallelization. OpenCL was later added to support GPUs and better CPU multithreading on supported devices.

Options

gravity_cl has the ability to select OpenCL platform (e.g. NVIDIA, Intel, AMD) and OpenCL device using -p and -d flags respectively. If no device flag is present, the device with the most compute units is selected. Similarly, if no platform is specified, the first platform retured by OpenCL is used.

For full set of options, use -h

Building

mkdir build
cd build
cmake ..
cmake --build .
ln -s ../res

This builds 2 executables, gravity and gravity_cl.

The res folder must be in the same directory as the executables so the OpenGL shaders and OpenCL kernel are visible.

Dependencies

About

N-body simulation - OpenGL + OpenCL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published