cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
constants.hpp
Go to the documentation of this file.
1 
9 #pragma once
10 #ifndef CUDA_API_WRAPPERS_CONSTANTS_HPP_
11 #define CUDA_API_WRAPPERS_CONSTANTS_HPP_
12 
13 #include "types.hpp"
14 
15 namespace cuda {
16 
29 enum { warp_size = 32 };
30 
31 namespace stream {
32 
33 // Would have called it "default" but that's a reserved word;
34 // Would have liked to make this an enum, but pointers are
35 // not appropriate for that
43 
44 } // namespace stream
45 
46 namespace device {
47 
48 enum : device::id_t {
54 };
55 
56 } // namespace device
57 
58 namespace event {
59 
63 enum : bool {
80 };
81 
86 enum : bool {
87  dont_record_timings = false,
88  do_record_timings = true,
89 };
90 
94 enum : bool {
95  not_interprocess = false,
96  interprocess = true,
97  single_process = not_interprocess
98 };
99 
100 } // namespace event
101 
105 enum : bool {
110 };
111 
112 enum : memory::shared::size_t { no_dynamic_shared_memory = 0 };
113 
114 enum : bool {
115  do_take_ownership = true,
116  do_not_take_ownership = false,
117 };
118 
119 enum : bool {
120  do_hold_primary_context_refcount_unit = true,
121  do_not_hold_primary_context_refcount_unit = false,
122 };
123 
124 namespace context {
125 
126 namespace detail_ {
127 
128 constexpr const CUcontext none { 0 };
129 
130 } // namespace detail_
131 
132 } // namespace context
133 
134 } // namespace cuda
135 
136 #endif // CUDA_API_WRAPPERS_CONSTANTS_HPP_
Definitions and functionality wrapping CUDA APIs.
Definition: array.hpp:22
If the CUDA runtime has not been set to a specific device, this is the ID of the device it defaults t...
Definition: constants.hpp:53
Thread blocks are not allowed to synchronize (the default, and likely faster, execution mode) ...
Definition: constants.hpp:109
CUdevice id_t
Numeric ID of a CUDA device used by the CUDA Runtime API.
Definition: types.hpp:850
Thread groups may span multiple blocks, so that they can synchronize their actions.
Definition: constants.hpp:107
unsigned size_t
Each physical core ("Symmetric Multiprocessor") on an nVIDIA GPU has a space of shared memory (see th...
Definition: types.hpp:730
CUstream handle_t
The CUDA driver's raw handle for streams.
Definition: types.hpp:239
The thread calling event_.synchronize() will block - yield control of the CPU and will only become re...
Definition: constants.hpp:79
Can be shared between processes. Must not be able to record timings.
Definition: constants.hpp:96
The thread calling event_.synchronize() will enter a busy-wait loop; this (might) minimize delay betw...
Definition: constants.hpp:70
Can only be used by the process which created it.
Definition: constants.hpp:95
const stream::handle_t default_stream_handle
The CUDA runtime provides a default stream on which work is scheduled when no stream is specified; fo...
Definition: constants.hpp:42
Fundamental CUDA-related type definitions.