Trick-17 / backends

Interchangeable backends in C++, OpenMP, CUDA, OpenCL, OpenACC
MIT License
2 stars 0 forks source link
c-plus-plus cross-platform cuda cuda-backend header-only openacc openacc-backend opencl opencl-backend openmp openmp-backend

backends

Interchangeable backends:

Project Health

Service System Compiler Status
Travis-CI Ubuntu 14.04
OSX
GCC 6
Clang
Build Status
AppVeyor Windows MSVC12
MSVC14
MSVC14.1
Build status

Including this library in your code

TODO...

Library usage

Filling a vector with a single value:

auto myVec = backends::vector<double>(2000);
backends::fill(myVec, 12.0);

Typical reductions:

auto myVec = backends::vector<double>{1, 2, 3, 4};
double sum  = backends::sum(myVec);
double mean = backends::mean(myVec);
// The sum should be 12, the mean should be 2.5