-
Notifications
You must be signed in to change notification settings - Fork 0
Kokkos::LayoutLeft
Header File: Kokkos_Layout.hpp
This Kokkos Layout, when provided to a multidimensional View, lays out memory such that the first index is the contiguous one. This matches the Fortran conventions for allocations.
Usage:
Kokkos::View<float*, Kokkos::LayoutLeft> my_view;
struct LayoutLeft {
typedef LayoutLeft array_layout;
size_t dimension[ARRAY_LAYOUT_MAX_RANK];
enum { is_extent_constructible = true };
LayoutLeft(LayoutLeft const&) = default;
LayoutLeft(LayoutLeft&&) = default;
LayoutLeft& operator=(LayoutLeft const&) = default;
LayoutLeft& operator=(LayoutLeft&&) = default;
KOKKOS_INLINE_FUNCTION
explicit constexpr LayoutLeft(size_t N0 = 0, size_t N1 = 0, size_t N2 = 0,
size_t N3 = 0, size_t N4 = 0, size_t N5 = 0,
size_t N6 = 0, size_t N7 = 0)
: dimension{N0, N1, N2, N3, N4, N5, N6, N7} {}
};
-
dimension
An array containing the size of each dimension of the Layout
-
array_layout
A tag signifying that this models the Layout concept
-
is_extent_constructible
A boolean enum to allow detection that this class is extent constructible
-
LayoutLeft(LayoutLeft const&) = default;
Default copy constructor, element-wise copies the other Layout
-
LayoutLeft(LayoutLeft&&) = default;
Default move constructor, element-wise moves the other Layout
KOKKOS_INLINE_FUNCTION
explicit constexpr LayoutLeft(size_t N0 = 0, size_t N1 = 0, size_t N2 = 0,
size_t N3 = 0, size_t N4 = 0, size_t N5 = 0,
size_t N6 = 0, size_t N7 = 0);
Constructor that takes in up to 8 sizes, to set the sizes of the corresponding dimenesions of the Layout
-
LayoutLeft& operator=(LayoutLeft const&) = default;
Default copy assignment, element-wise copies the other Layout
-
LayoutLeft& operator=(LayoutLeft&&) = default;
Default move assignment, element-wise moves the other Layout
- None
Home:
- Introduction
- Machine Model
- Programming Model
- Compiling
- Initialization
- View
- Parallel Dispatch
- Hierarchical Parallelism
- Custom Reductions
- Atomic Operations
- Subviews
- Interoperability
- Kokkos and Virtual Functions
- Initialization and Finalization
- View
- Data Parallelism
- Execution Policies
- Spaces
- Task Parallelism
- Utilities
- STL Compatibility
- Numerics
- Detection Idiom