#include "error.hpp"
#include "constants.hpp"
#include "types.hpp"
Go to the source code of this file.
|
class | cuda::context::current::scoped_override_t |
| A RAII-based mechanism for pushing a context onto the context stack for what remains of the current (C++ language) scope - making it the current context - then popping it back when exiting the scope - restoring the stack and the current context to what they had been previously. More...
|
|
|
| cuda |
| Definitions and functionality wrapping CUDA APIs.
|
|
◆ CUDA_CONTEXT_FOR_THIS_SCOPE
This macro will set the current device for the remainder of the scope in which it is invoked, and will change it back to the previous value when exiting the scope.
Use it as an opaque command, which does not explicitly expose the variable defined under the hood to effect this behavior.
◆ synchronize()
void cuda::context::current::synchronize |
( |
| ) |
|
|
inline |
Avoid executing any additional instructions on this thread until all work on all streams in the current context has been concluded.
- Note
- The synchronization will occur using the current context's sync_scheduling_policy()