|
Cabana 0.8.0-dev
|
Logical grid indexing. More...
#include <Cabana_Utils.hpp>#include <Kokkos_Core.hpp>#include <algorithm>#include <array>#include <string>

Go to the source code of this file.
Classes | |
| class | Cabana::Grid::IndexSpace< N > |
| Structured index space. More... | |
Namespaces | |
| namespace | Cabana |
| Core: particle data structures and algorithms. | |
Functions | |
| template<class ExecutionSpace> | |
| Kokkos::RangePolicy< ExecutionSpace > | Cabana::Grid::createExecutionPolicy (const IndexSpace< 1 > &index_space, const ExecutionSpace &exec_space) |
| Create a multi-dimensional execution policy over an index space. | |
| template<class ExecutionSpace, class WorkTag> | |
| Kokkos::RangePolicy< ExecutionSpace, WorkTag > | Cabana::Grid::createExecutionPolicy (const IndexSpace< 1 > &index_space, const ExecutionSpace &exec_space, const WorkTag &) |
| Create a multi-dimensional execution policy over an index space. | |
| template<class IndexSpace_t, class ExecutionSpace> | |
| Kokkos::MDRangePolicy< ExecutionSpace, Kokkos::Rank< IndexSpace_t::Rank > > | Cabana::Grid::createExecutionPolicy (const IndexSpace_t &index_space, const ExecutionSpace &exec_space) |
| Create a multi-dimensional execution policy over an index space. | |
| template<class IndexSpace_t, class ExecutionSpace, class WorkTag> | |
| Kokkos::MDRangePolicy< ExecutionSpace, WorkTag, Kokkos::Rank< IndexSpace_t::Rank > > | Cabana::Grid::createExecutionPolicy (const IndexSpace_t &index_space, const ExecutionSpace &exec_space, const WorkTag &) |
| Create a multi-dimensional execution policy over an index space with a work tag. | |
| template<class Scalar, class... Params> | |
| Kokkos::View< Scalar *, Params... > | Cabana::Grid::createView (const std::string &label, const IndexSpace< 1 > &index_space) |
| Given an index space create a view over the extent of that index space. | |
| template<class Scalar, class... Params> | |
| Kokkos::View< Scalar *, Params..., Kokkos::MemoryUnmanaged > | Cabana::Grid::createView (const IndexSpace< 1 > &index_space, Scalar *data) |
| Given an index space and a data pointer create an unmanaged view over the extent of that index space. | |
| template<class Scalar, class... Params> | |
| Kokkos::View< Scalar **, Params... > | Cabana::Grid::createView (const std::string &label, const IndexSpace< 2 > &index_space) |
| Given an index space create a view over the extent of that index space. | |
| template<class Scalar, class... Params> | |
| Kokkos::View< Scalar **, Params..., Kokkos::MemoryUnmanaged > | Cabana::Grid::createView (const IndexSpace< 2 > &index_space, Scalar *data) |
| Given an index space and a data pointer create an unmanaged view over the extent of that index space. | |
| template<class Scalar, class... Params> | |
| Kokkos::View< Scalar ***, Params... > | Cabana::Grid::createView (const std::string &label, const IndexSpace< 3 > &index_space) |
| Given an index space create a view over the extent of that index space. | |
| template<class Scalar, class... Params> | |
| Kokkos::View< Scalar ***, Params..., Kokkos::MemoryUnmanaged > | Cabana::Grid::createView (const IndexSpace< 3 > &index_space, Scalar *data) |
| Given an index space and a data pointer create an unmanaged view over the extent of that index space. | |
| template<class Scalar, class... Params> | |
| Kokkos::View< Scalar ****, Params... > | Cabana::Grid::createView (const std::string &label, const IndexSpace< 4 > &index_space) |
| Given an index space create a view over the extent of that index space. | |
| template<class Scalar, class... Params> | |
| Kokkos::View< Scalar ****, Params..., Kokkos::MemoryUnmanaged > | Cabana::Grid::createView (const IndexSpace< 4 > &index_space, Scalar *data) |
| Given an index space and a data pointer create an unmanaged view over the extent of that index space. | |
| template<class ViewType> | |
| KOKKOS_INLINE_FUNCTION auto | Cabana::Grid::createSubview (const ViewType &view, const IndexSpace< 1 > &index_space) -> decltype(Kokkos::subview(view, index_space.range(0))) |
| Given a view create a subview over the given index space. | |
| template<class ViewType> | |
| KOKKOS_INLINE_FUNCTION auto | Cabana::Grid::createSubview (const ViewType &view, const IndexSpace< 2 > &index_space) -> decltype(Kokkos::subview(view, index_space.range(0), index_space.range(1))) |
| Given a view create a subview over the given index space. | |
| template<class ViewType> | |
| KOKKOS_INLINE_FUNCTION auto | Cabana::Grid::createSubview (const ViewType &view, const IndexSpace< 3 > &index_space) -> decltype(Kokkos::subview(view, index_space.range(0), index_space.range(1), index_space.range(2))) |
| Given a view create a subview over the given index space. | |
| template<class ViewType> | |
| KOKKOS_INLINE_FUNCTION auto | Cabana::Grid::createSubview (const ViewType &view, const IndexSpace< 4 > &index_space) -> decltype(Kokkos::subview(view, index_space.range(0), index_space.range(1), index_space.range(2), index_space.range(3))) |
| Given a view create a subview over the given index space. | |
| template<long N> | |
| IndexSpace< N+1 > | Cabana::Grid::appendDimension (const IndexSpace< N > &index_space, const long size) |
| Given an N-dimensional index space append an additional dimension with the given size. | |
| template<long N> | |
| IndexSpace< N+1 > | Cabana::Grid::appendDimension (const IndexSpace< N > &index_space, const long min, const long max) |
| Given an N-dimensional index space append an additional dimension with the given range. | |
Logical grid indexing.
| IndexSpace< N+1 > Cabana::Grid::appendDimension | ( | const IndexSpace< N > & | index_space, |
| const long | min, | ||
| const long | max ) |
Given an N-dimensional index space append an additional dimension with the given range.
| IndexSpace< N+1 > Cabana::Grid::appendDimension | ( | const IndexSpace< N > & | index_space, |
| const long | size ) |
Given an N-dimensional index space append an additional dimension with the given size.
| Kokkos::RangePolicy< ExecutionSpace > Cabana::Grid::createExecutionPolicy | ( | const IndexSpace< 1 > & | index_space, |
| const ExecutionSpace & | exec_space ) |
Create a multi-dimensional execution policy over an index space.
| Kokkos::RangePolicy< ExecutionSpace, WorkTag > Cabana::Grid::createExecutionPolicy | ( | const IndexSpace< 1 > & | index_space, |
| const ExecutionSpace & | exec_space, | ||
| const WorkTag & | ) |
Create a multi-dimensional execution policy over an index space.
Rank-1 specialization with a work tag.
| Kokkos::MDRangePolicy< ExecutionSpace, Kokkos::Rank< IndexSpace_t::Rank > > Cabana::Grid::createExecutionPolicy | ( | const IndexSpace_t & | index_space, |
| const ExecutionSpace & | exec_space ) |
Create a multi-dimensional execution policy over an index space.
| Kokkos::MDRangePolicy< ExecutionSpace, WorkTag, Kokkos::Rank< IndexSpace_t::Rank > > Cabana::Grid::createExecutionPolicy | ( | const IndexSpace_t & | index_space, |
| const ExecutionSpace & | exec_space, | ||
| const WorkTag & | ) |
Create a multi-dimensional execution policy over an index space with a work tag.
| KOKKOS_INLINE_FUNCTION auto Cabana::Grid::createSubview | ( | const ViewType & | view, |
| const IndexSpace< 1 > & | index_space ) -> decltype( Kokkos::subview( view, index_space.range( 0 ) ) ) |
Given a view create a subview over the given index space.
Rank-1 specialization.
| KOKKOS_INLINE_FUNCTION auto Cabana::Grid::createSubview | ( | const ViewType & | view, |
| const IndexSpace< 2 > & | index_space ) -> decltype( Kokkos::subview( view, index_space.range( 0 ), index_space.range( 1 ) ) ) |
Given a view create a subview over the given index space.
Rank-2 specialization.
| KOKKOS_INLINE_FUNCTION auto Cabana::Grid::createSubview | ( | const ViewType & | view, |
| const IndexSpace< 3 > & | index_space ) -> decltype( Kokkos::subview( view, index_space.range( 0 ), index_space.range( 1 ), index_space.range( 2 ) ) ) |
Given a view create a subview over the given index space.
Rank-3 specialization.
| KOKKOS_INLINE_FUNCTION auto Cabana::Grid::createSubview | ( | const ViewType & | view, |
| const IndexSpace< 4 > & | index_space ) -> decltype( Kokkos::subview( view, index_space.range( 0 ), index_space.range( 1 ), index_space.range( 2 ), index_space.range( 3 ) ) ) |
Given a view create a subview over the given index space.
Rank-4 specialization.
| Kokkos::View< Scalar *, Params..., Kokkos::MemoryUnmanaged > Cabana::Grid::createView | ( | const IndexSpace< 1 > & | index_space, |
| Scalar * | data ) |
Given an index space and a data pointer create an unmanaged view over the extent of that index space.
Rank-1 specialization.
| Kokkos::View< Scalar **, Params..., Kokkos::MemoryUnmanaged > Cabana::Grid::createView | ( | const IndexSpace< 2 > & | index_space, |
| Scalar * | data ) |
Given an index space and a data pointer create an unmanaged view over the extent of that index space.
Rank-2 specialization.
| Kokkos::View< Scalar ***, Params..., Kokkos::MemoryUnmanaged > Cabana::Grid::createView | ( | const IndexSpace< 3 > & | index_space, |
| Scalar * | data ) |
Given an index space and a data pointer create an unmanaged view over the extent of that index space.
Rank-3 specialization.
| Kokkos::View< Scalar ****, Params..., Kokkos::MemoryUnmanaged > Cabana::Grid::createView | ( | const IndexSpace< 4 > & | index_space, |
| Scalar * | data ) |
Given an index space and a data pointer create an unmanaged view over the extent of that index space.
Rank-4 specialization.
| Kokkos::View< Scalar *, Params... > Cabana::Grid::createView | ( | const std::string & | label, |
| const IndexSpace< 1 > & | index_space ) |
Given an index space create a view over the extent of that index space.
Rank-1 specialization.
| Kokkos::View< Scalar **, Params... > Cabana::Grid::createView | ( | const std::string & | label, |
| const IndexSpace< 2 > & | index_space ) |
Given an index space create a view over the extent of that index space.
Rank-2 specialization.
| Kokkos::View< Scalar ***, Params... > Cabana::Grid::createView | ( | const std::string & | label, |
| const IndexSpace< 3 > & | index_space ) |
Given an index space create a view over the extent of that index space.
Rank-3 specialization.
| Kokkos::View< Scalar ****, Params... > Cabana::Grid::createView | ( | const std::string & | label, |
| const IndexSpace< 4 > & | index_space ) |
Given an index space create a view over the extent of that index space.
Rank-4 specialization.