Skip to content
Snippets Groups Projects
Commit 180a7ace authored by Ben Cumming's avatar Ben Cumming Committed by Sam Yates
Browse files

Stand alone CUDA compilation for threshold_watcher in gpu backend (#345)

Refactor the threshold_watcher and stack data structures in the gpu backend so that they are amenable to separable compilation.

* Make `gpu::stack<T>` have a host-only interface that wraps a POD type `gpu::stack_base<T>`.
* Implement a `push_back(stack_base, value)` method in `backends/gpu/kernels/stack.hpp` that is visible only to device code.
* Move `test_thresholds` kernel to a .cu file, replacing template parameters with types provided by `backends/fvm_types.hpp`.
* Add a simple C function interface, callable from host side code, defined in `backends/gpu/threshold_common.hpp`.
* Simplify the `gpu::impl::padded_size` function (both to read and in terms of efficiency).
* Use `typeid` as the default for pretty-printing types in the memory back end.
* Update the `test_gpu_stack` unit test to support new gpu stack interface.
* Fix bug in the `test_spikes` unit test, which was not running the GPU back end in the cuda unit tests.
parent f937973f
No related branches found
No related tags found
No related merge requests found
Showing with 332 additions and 172 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment