Retour au classement

boostorg/compute

C++boostorg.github.io/compute/

A C++ GPU Computing Library for OpenCL

openclboostc-plus-pluscppcomputegpugpgpuperformancehpc
Croissance des étoiles
Étoiles
1.7k
Forks
339
Croissance hebdomadaire
Issues
131
5001k1.5k
mars 2013août 2017févr. 2022juil. 2026
README

Boost.Compute

Build Status Build status Coverage Status Gitter

Boost.Compute is a GPU/parallel-computing library for C++ based on OpenCL.

The core library is a thin C++ wrapper over the OpenCL API and provides access to compute devices, contexts, command queues and memory buffers.

On top of the core library is a generic, STL-like interface providing common algorithms (e.g. transform(), accumulate(), sort()) along with common containers (e.g. vector<T>, flat_set<T>). It also features a number of extensions including parallel-computing algorithms (e.g. exclusive_scan(), scatter(), reduce()) and a number of fancy iterators (e.g. transform_iterator<>, permutation_iterator<>, zip_iterator<>).

The full documentation is available at http://boostorg.github.io/compute/.

Example

The following example shows how to sort a vector of floats on the GPU:

#include <vector>
#include <algorithm>
#include <boost/compute.hpp>

namespace compute = boost::compute;

int main()
{
    // get the default compute device
    compute::device gpu = compute::system::default_device();

    // create a compute context and command queue
    compute::context ctx(gpu);
    compute::command_queue queue(ctx, gpu);

    // generate random numbers on the host
    std::vector<float> host_vector(1000000);
    std::generate(host_vector.begin(), host_vector.end(), rand);

    // create vector on the device
    compute::vector<float> device_vector(1000000, ctx);

    // copy data to the device
    compute::copy(
        host_vector.begin(), host_vector.end(), device_vector.begin(), queue
    );

    // sort data on the device
    compute::sort(
        device_vector.begin(), device_vector.end(), queue
    );

    // copy data back to the host
    compute::copy(
        device_vector.begin(), device_vector.end(), host_vector.begin(), queue
    );

    return 0;
}

Boost.Compute is a header-only library, so no linking is required. The example above can be compiled with:

g++ -I/path/to/compute/include sort.cpp -lOpenCL

More examples can be found in the tutorial and under the examples directory.

Support

Questions about the library (both usage and development) can be posted to the mailing list.

Bugs and feature requests can be reported through the issue tracker.

Also feel free to send me an email with any problems, questions, or feedback.

Help Wanted

The Boost.Compute project is currently looking for additional developers with interest in parallel computing.

Please send an email to Kyle Lutz (kyle.r.lutz@gmail.com) for more information.

Dépôts similaires
hashcat/hashcat

World's fastest and most advanced password recovery utility

Chashcatpassword
hashcat.net/hashcat/
26.4k3.5k
apache/tvm

Open Machine Learning Compiler Framework

PythonPyPIApache License 2.0compilertensor
tvm.apache.org
13.6k3.9k
openwall/john

John the Ripper jumbo - advanced offline password cracker, which supports hundreds of hash and cipher types, and runs on many operating systems, CPUs, GPUs, and even some FPGAs

COtherjohnc
openwall.com/john/
13.4k2.5k
aidlearning/AidLearning-FrameWork

🔥🔥🔥AidLearning is a powerful AIOT development platform, AidLearning builds a linux env supporting GUI, deep learning and visual IDE on Android...Now Aid supports CPU+GPU+NPU for inference with high performance acceleration...Linux on Android or HarmonyOS

PythonPyPIOtherlinux-androidlinux-on-android
docs.aidlux.com
5.8k718
LWJGL/lwjgl3

LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.

JavaMavenBSD 3-Clause "New" or "Revised" Licenselwjglkotlin
lwjgl.org
5.4k706
ProjectPhysX/FluidX3D

The fastest and most memory efficient lattice Boltzmann CFD software, running on all GPUs and CPUs via OpenCL. Free for non-commercial use.

C++Othercfdcomputational-fluid-dynamics
youtube.com/@ProjectPhysX
5.2k468
dotnet/Silk.NET

The high-speed OpenGL, OpenCL, OpenAL, OpenXR, GLFW, SDL, Vulkan, Assimp, WebGPU, and DirectX bindings library your mother warned you about.

C#MIT Licenseopenglcsharp
dotnet.github.io/Silk.NET
5.1k469
XiaoMi/mace

MACE is a deep learning inference framework optimized for mobile heterogeneous computing platforms.

C++Apache License 2.0deep-learningneural-network
5k822
arrayfire/arrayfire

ArrayFire: a general purpose GPU library.

C++BSD 3-Clause "New" or "Revised" Licensearrayfirec-plus-plus
arrayfire.com
4.9k555
opentk/opentk

The Open Toolkit library is a fast, low-level C# wrapper for OpenGL, OpenAL & OpenCL. It also includes windowing, mouse, keyboard and joystick input and a robust and fast math library, giving you everything you need to write your own renderer or game engine. OpenTK can be used standalone or inside a GUI on Windows, Linux, Mac.

C#Otherc-sharpopengl
opentk.net
3.5k645
ARM-software/ComputeLibrary

The Compute Library is a set of computer vision and machine learning functions optimised for both Arm CPUs and GPUs using SIMD technologies.

C++neonopencl
3.2k820
diku-dk/futhark

:boom::computer::boom: A data-parallel functional programming language

HaskellISC Licenselanguageboom
futhark-lang.org
2.8k206