-
Notifications
You must be signed in to change notification settings - Fork 0
Kokkos::SpaceAccessibility
Kokkos::SpaceAccessibility<> is a traits class template that takes an ExecutionSpace type or MemorySpace type as the first template argument and a MemorySpace type as the second type and expresses details about the relationship between those entities. Given memory space types MSp1 and MSp2 and an execution space type Ex, the following expressions will be valid with the specified meaning:
Kokkos::SpaceAccessibility<Ex, MSp1>::accessibleA compile-time value convertible to bool guaranteed to be true if and only if accessing memory allocated by an instance of MSp1 from a thread of execution provided by an instance of Ex (e.g., within a parallel pattern launched on an instance of Ex) is well-defined and valid within the Kokkos programming model for all instances of Ex and all instances of MSp1.
Kokkos::SpaceAccessibility<MSp1, MSp2>::accessibleEquivalent to Kokkos::SpaceAccessibility<MSp1::execution_space, MSp2>::accessible.
Kokkos::SpaceAccessibility<MSp1, MSp2>::assignableA compile-time value convertible to bool guaranteed to be true if and only if it is valid within the Kokkos programming model to assign values from any (otherwise valid) instance of Kokkos::View type V2 (with std::is_same<V2::memory_space, MSp2>::value equal to true) to references retrieved from any (otherwise valid) instance of a View type V1 (with std::is_same<V1::memory_space, MSp1>::value equal to true).
Kokkos::SpaceAccessibility<Ex, MSp1>::assignableEquivalent to Kokkos::SpaceAccessibility<Ex::memory_space, MSp1>::assignable.
Kokkos::SpaceAccessibility<MSp1, MSp2>::deepcopyA compile-time value convertible to bool guaranteed to be true if and only if it is valid within the Kokkos programming model to Kokkos::deep_copy from any (otherwise valid) instance of Kokkos::View type V2 (with std::is_same<V2::memory_space, MSp2>::value equal to true) to any (otherwise valid and otherwise compatible) instance of a View type V1 (with std::is_same<V1::memory_space, MSp1>::value equal to true). In other words, if v2 is a valid instance of V2 and v1 is a valid instance of V1 (with shape and other attributes otherwise compatible with v2), the following expression will be well-defined and valid in the Kokkos programming model:
Kokkos::deep_copy(v1, v2);Kokkos::SpaceAccessibility<Ex, MSp1>::deepcopyEquivalent to Kokkos::SpaceAccessibility<Ex::memory_space, MSp1>::deepcopy.
Additionally, the following nested type names will be defined:
Kokkos::SpaceAccessibility<Ex, MSp1>::spaceAn "intercessory" memory space that should be used to deep copy memory for access by any instance of Ex. Formally, a type meeting the requirements of Kokkos::Device with the following expressions all true at compile-time:
Kokkos::SpaceAccessibility<Ex, Kokkos::SpaceAccessibility<Ex, MSp1>::space::memory_space>::accessibleKokkos::SpaceAccessibility<Kokkos::SpaceAccessibility<Ex, MSp1>::space::memory_space, MSp1>::deepcopyKokkos::SpaceAccessibility<Ex, Kokkos::SpaceAccessibility<Ex, MSp1>::space::memory_space>::deepcopy
Kokkos::SpaceAccessibility<MSp1, MSp2>::spaceEquivalent to Kokkos::SpaceAccessibility<MSp1::execution_space, MSp2>::space.
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