Skip to content

Commit

Permalink
Provide source_generator::set_smem(size_t) for CUDA backend
Browse files Browse the repository at this point in the history
  • Loading branch information
ddemidov committed Oct 20, 2016
1 parent faf15e4 commit 12f0e32
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vexcl/backend/cuda/kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ class kernel {
push_arg(arg.raw());
}

/// Adds local memory to the kernel.
void set_smem(size_t smem_per_thread) {
smem = workgroup_size() * smem_per_thread;
}

/// Adds local memory to the kernel.
template <class F>
void set_smem(F &&f) {
Expand Down

0 comments on commit 12f0e32

Please sign in to comment.