cuda::experimental::places::exec_place_host_impl#
-
class exec_place_host_impl : public cuda::experimental::places::exec_place::impl#
Host execution place implementation.
Host is modeled as a 1-element grid containing the host execution context.
Public Functions
-
inline exec_place_host_impl()#
- inline ::std::shared_ptr<exec_place::impl> get_place(
- size_t idx
-
inline virtual exec_place activate(size_t idx) const override#
Activate the sub-place at the given index.
For scalar places, idx must be 0. Returns the previous execution state needed for deactivate().
- inline virtual void deactivate(
- const exec_place &prev,
- size_t idx = 0
Deactivate the sub-place at the given index, restoring previous state.
-
inline virtual bool is_host() const override#
-
inline virtual data_place affine_data_place() const override#
- inline virtual stream_pool &get_stream_pool(
- bool for_computation,
- exec_place_resources &res,
- const exec_place&
Return the stream pool to draw streams from for this place.
Pooled implementations (device, host) use the default body, which looks up / lazily creates a per-place pool inside the supplied registry, keyed by
this(a stable singleton pointer for those impls).Self-contained implementations (
exec_place_cuda_stream_impl,exec_place_green_ctx_impl) override this method and ignore the registry, returning their embedded pool instead.The grid implementation forwards
resto its first sub-place.- Parameters:
for_computation – If true, return the computation pool slot; otherwise return the data-transfer slot.
res – Registry of per-place stream pools (typically owned by an
async_resources_handle).self – The
exec_placewrapping*this(kept for derived overrides that need access to the public-facing place).
-
inline ::std::string to_string() const override#
-
inline virtual dim4 get_dims() const#
Get the dimensions of this grid.
For scalar places, returns dim4(1, 1, 1, 1).
-
inline virtual size_t size() const#
Get the total number of places in this grid.
-
inline virtual bool is_device() const#
-
inline virtual void set_affine_data_place(data_place place)#
-
inline virtual int cmp(const impl &rhs) const#
Three-way comparison.
- Returns:
-1 if *this < rhs, 0 if *this == rhs, 1 if *this > rhs
-
inline virtual size_t hash() const#
Public Static Attributes
-
static constexpr size_t pool_size = exec_place_default_pool_size#
-
static constexpr size_t data_pool_size = exec_place_default_data_pool_size#
-
inline exec_place_host_impl()#