Traits¶
Basic Traits¶
-
template<typename View>
using KokkosComm::Traits¶ A common interface to access Kokkos::View-like types.
-
static bool is_contiguous(const View &v)¶
- Parameters:
v – The View to query
- Returns:
true iff the data in the
v
is contiguous.
-
static size_t span(const View &v)¶
- Returns:
the number of bytes between the beginning of the first byte and the end of the last byte of data in
v
.
For example, if
View
was an std::vector<int16_t> of size 3, it would be 6. If theView
is non-contiguous, the result includes any “holes” inv
.
-
static constexpr bool is_reference_counted()¶
- Returns:
true iff the type is subject to reference counting (e.g., Kokkos::View)
This is used to determine if asynchronous MPI operations may need to extend the lifetime of this type when it’s used as an argument.
-
static constexpr size_t rank()¶
- Returns:
the rank (number of dimensions) of the
View
type
-
static bool is_contiguous(const View &v)¶
Packing Traits¶
Strategies for handling non-contiguous views