Skip to content

Instantly share code, notes, and snippets.

@sebsjoberg
sebsjoberg / hello.cpp
Last active August 29, 2015 13:55 — forked from ddemidov/hello.cpp
#include <vexcl/vexcl.hpp>
vex::vector<cl_float2>
hilbert(vex::vector<float> &in, std::size_t rows, std::size_t cols) {
// No need to pass context in:
const auto &ctx = in.queue_list();
// Use function instead of vector. Should save global memory IO.
VEX_FUNCTION(h, float(size_t/*prm1 = idx*/, size_t/*prm2 = rows*/),
VEX_STRINGIZE_SOURCE(