forked from kokkos/kokkos
-
Notifications
You must be signed in to change notification settings - Fork 0
Kokkos::StaticCrsGraph
Christian Trott edited this page May 1, 2020
·
1 revision
The StaticCrsGraph is a Compressed row storage array with the row map, the column indices and the non-zero entries stored in 3 different Kokkos::Views. Appropriate types and functions are provided to simplify manipulation and access to CRS data on either a host or device.
Usage:
using StaticCrsGraphType = Kokkos::StaticCrsGraph<unsigned, Space, void, void, unsigned>;
StaticCrsGraphType graph();
const int begin = graph.row_map[0];
const int end = graph.row_map[1];
double sum = 0;
for (int i = begin; i < end; i++) {
Kokkos::View<unsigned, Space> v(graph.entries(i));
for (int j = 0; j < v.extent(0); j++) {
sum += v(j);
}
}
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