yacx-YetAnotherCudaExecutor  0.6.2
wrapper to easily compile and execute cuda kernels
docs/kernel_args.cpp

Will execute the Kernel with add(1, 2, 3, 4, result); and the result will be downloaded from device to host

#include "yacx/Kernel.hpp"
#include "yacx/KernelArgs.hpp"
#include "yacx/Program.hpp"
#include "yacx/Source.hpp"
#include <vector_types.h>
int a = 1;
int b = 2;
int c = 3;
int d = 4;
int result = 0;
std::vector<KernelArg> args;
args.emplace_back(KernelArg{&a});
args.emplace_back(KernelArg{&b});
args.emplace_back(KernelArg{&c});
args.emplace_back(KernelArg{&d});
args.emplace_back(KernelArg{&result, sizeof(int), true});
dim3 grid(1);
dim3 block(1);
source.program("add").compile().configure(grid, block).launch(args);
yacx::KernelArg
Definition: KernelArgs.hpp:81