cuda::experimental::stf::exec_place_grid_impl#

class exec_place_grid_impl : public cuda::experimental::stf::exec_place::impl#

Implementation class for multi-device execution place grids.

This is used internally by make_grid() and related factory functions.

Public Functions

inline exec_place_grid_impl(::std::vector<exec_place> _places)#
inline exec_place_grid_impl(
::std::vector<exec_place> _places,
const dim4 &_dims
)#
inline virtual dim4 get_dims() const override#

Get the dimensions of this grid.

For scalar places, returns dim4(1, 1, 1, 1).

inline virtual size_t size() const override#

Get the total number of places in this grid.

inline ::std::shared_ptr<exec_place::impl> get_place(
size_t idx
) override#
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
) const override#

Deactivate the sub-place at the given index, restoring previous state.

inline ::std::string to_string() const override#
inline virtual int cmp(const exec_place::impl &rhs) const override#

Three-way comparison.

Returns:

-1 if *this < rhs, 0 if *this == rhs, 1 if *this > rhs

inline virtual size_t hash() const override#
inline virtual stream_pool &get_stream_pool(
bool for_computation
) const override#
inline virtual bool is_host() const#
inline virtual bool is_device() const#
inline virtual data_place affine_data_place() const#
inline virtual void set_affine_data_place(data_place place)#

Public Static Attributes

static constexpr size_t pool_size = 4#
static constexpr size_t data_pool_size = 4#