Under Construction
This page is a placeholder. Once my research project is open-source all necessary information will be published here. In the meantime, have you ever wanted to write GPU code like this?
using namespace std;
int main(int argc, char* argv[]) {
size_t n = 1 << 24;
vector<int> a(n);
vector<int> b(n);
vector<int> c(n);
auto vadd = [](const vector<int> &a, const vector<int> &b, vector<int> &c) {
auto i = Thread::get().global.x;
if (i >= a.size()) return;
c[i] = a[i] + b[i];
};
size_t threads = 128;
size_t blocks = (n + (threads * 2 - 1)) / (threads * 2);
auto vadd_gpu = kernel(vadd, {{blocks}, {threads}});
vadd_gpu(a, b, c);
return 0;
}
Here is something to read:
Publications
M. Haidl, M. Steuwer, T. Humernbrum, and S. Gorlatch, "Multi-Stage Programming for GPUs in Modern C++ using PACXX," in Proceedings of General-Purpose GPU at PPoPP '16, GPGPU-9. (to appear)
M. Haidl and S. Gorlatch, "Programming GPUs with C++14 and Just-In-Time Compilation," in Proceedings of the International Conference on Parallel Computing (ParCo) 2015. (to appear)
M. Haidl and S. Gorlatch, "PACXX: Towards a Unified Programming Model for Programming Accelerators Using C++14," in Proceedings of LLVM Compiler Infrastructure in HPC at SC '14, LLVM-HPC 2014, IEEE, 2014, pp. 1-11.