Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana_Parallel.hpp File Reference

SIMD and neighbor extension of Kokkos parallel iteration. More...

#include <Cabana_ExecutionPolicy.hpp>
#include <Cabana_LinkedCellList.hpp>
#include <Cabana_NeighborList.hpp>
#include <Cabana_Types.hpp>
#include <impl/Cabana_CartesianGrid.hpp>
#include <Kokkos_Core.hpp>
#include <Kokkos_Profiling_ScopedRegion.hpp>
#include <cstdlib>
#include <type_traits>
Include dependency graph for Cabana_Parallel.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Cabana::FirstNeighborsTag
 Loop over particle neighbors. More...
 
class  Cabana::SecondNeighborsTag
 Loop over particle neighbors (first) and neighbor's neighbors (second) More...
 
class  Cabana::SerialOpTag
 Neighbor operations are executed in serial on each particle thread. More...
 
class  Cabana::TeamOpTag
 Neighbor operations are executed with team parallelism. More...
 
class  Cabana::TeamVectorOpTag
 Neighbor operations are executed with team vector parallelism. More...
 

Namespaces

namespace  Cabana
 Core: particle data structures and algorithms.
 

Functions

template<class FunctorType, int VectorLength, class... ExecParameters>
void Cabana::simd_parallel_for (const SimdPolicy< VectorLength, ExecParameters... > &exec_policy, const FunctorType &functor, const std::string &str="")
 Execute a vectorized functor in parallel with a 2d execution policy.
 
template<class FunctorType, class NeighborListType, class... ExecParameters>
void Cabana::neighbor_parallel_for (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const NeighborListType &list, const FirstNeighborsTag, const SerialOpTag, const std::string &str="", typename std::enable_if<(!is_linked_cell_list< NeighborListType >::value), int >::type *=0)
 Execute functor in parallel according to the execution policy over particles with a thread-local serial loop over particle first neighbors.
 
template<class FunctorType, class NeighborListType, class... ExecParameters>
void Cabana::neighbor_parallel_for (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const NeighborListType &list, const SecondNeighborsTag, const SerialOpTag, const std::string &str="", typename std::enable_if<(!is_linked_cell_list< NeighborListType >::value), int >::type *=0)
 Execute functor in parallel according to the execution policy over particles with thread-local serial loops over particle first and second neighbors.
 
template<class FunctorType, class NeighborListType, class... ExecParameters>
void Cabana::neighbor_parallel_for (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const NeighborListType &list, const FirstNeighborsTag, const TeamOpTag, const std::string &str="", typename std::enable_if<(!is_linked_cell_list< NeighborListType >::value), int >::type *=0)
 Execute functor in parallel according to the execution policy over particles with team parallelism over particle first neighbors.
 
template<class FunctorType, class NeighborListType, class... ExecParameters>
void Cabana::neighbor_parallel_for (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const NeighborListType &list, const SecondNeighborsTag, const TeamOpTag, const std::string &str="", typename std::enable_if<(!is_linked_cell_list< NeighborListType >::value), int >::type *=0)
 Execute functor in parallel according to the execution policy over particles with team parallelism over particle first neighbors and serial loop over second neighbors.
 
template<class FunctorType, class NeighborListType, class... ExecParameters>
void Cabana::neighbor_parallel_for (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const NeighborListType &list, const SecondNeighborsTag, const TeamVectorOpTag, const std::string &str="", typename std::enable_if<(!is_linked_cell_list< NeighborListType >::value), int >::type *=0)
 Execute functor in parallel according to the execution policy over particles with team parallelism over particle first neighbors and vector loop parallelism over second neighbors.
 
template<class FunctorType, class NeighborListType, class ReduceType, class... ExecParameters>
void Cabana::neighbor_parallel_reduce (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const NeighborListType &list, const FirstNeighborsTag, const SerialOpTag, ReduceType &reduce_val, const std::string &str="", typename std::enable_if<(!is_linked_cell_list< NeighborListType >::value), int >::type *=0)
 Execute functor reduction in parallel according to the execution policy over particles with a thread-local serial loop over particle first neighbors.
 
template<class FunctorType, class NeighborListType, class ReduceType, class... ExecParameters>
void Cabana::neighbor_parallel_reduce (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const NeighborListType &list, const SecondNeighborsTag, const SerialOpTag, ReduceType &reduce_val, const std::string &str="", typename std::enable_if<(!is_linked_cell_list< NeighborListType >::value), int >::type *=0)
 Execute functor reduction in parallel according to the execution policy over particles with thread-local serial loops over particle first and second neighbors.
 
template<class FunctorType, class NeighborListType, class ReduceType, class... ExecParameters>
void Cabana::neighbor_parallel_reduce (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const NeighborListType &list, const FirstNeighborsTag, const TeamOpTag, ReduceType &reduce_val, const std::string &str="", typename std::enable_if<(!is_linked_cell_list< NeighborListType >::value), int >::type *=0)
 Execute functor reduction in parallel according to the execution policy over particles with team parallelism over particle first neighbors.
 
template<class FunctorType, class NeighborListType, class ReduceType, class... ExecParameters>
void Cabana::neighbor_parallel_reduce (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const NeighborListType &list, const SecondNeighborsTag, const TeamOpTag, ReduceType &reduce_val, const std::string &str="", typename std::enable_if<(!is_linked_cell_list< NeighborListType >::value), int >::type *=0)
 Execute functor reduction in parallel according to the execution policy over particles with team parallelism over particle first neighbors and serial loop over second neighbors.
 
template<class FunctorType, class NeighborListType, class ReduceType, class... ExecParameters>
void Cabana::neighbor_parallel_reduce (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const NeighborListType &list, const SecondNeighborsTag, const TeamVectorOpTag, ReduceType &reduce_val, const std::string &str="", typename std::enable_if<(!is_linked_cell_list< NeighborListType >::value), int >::type *=0)
 Execute functor reduction in parallel according to the execution policy over particles with team parallelism over particle first neighbors and vector loop parallelism over second neighbors.
 
template<class IndexType, class FunctorType, class NeighborListType>
KOKKOS_INLINE_FUNCTION void Cabana::for_each_neighbor (const IndexType i, const FunctorType &neighbor_functor, const NeighborListType &list, const FirstNeighborsTag)
 Execute functor in serial within existing parallel kernel over particle first neighbors.
 
template<class IndexType, class FunctorType, class NeighborListType, class TeamMemberType>
KOKKOS_INLINE_FUNCTION void Cabana::for_each_neighbor (const IndexType i, const TeamMemberType team, const FunctorType &neighbor_functor, const NeighborListType &list, const FirstNeighborsTag)
 Execute team parallel functor within existing parallel kernel over particle first neighbors.
 
template<class FunctorType, class LinkedCellType, class... ExecParameters>
void Cabana::neighbor_parallel_for (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const LinkedCellType &list, const FirstNeighborsTag, const SerialOpTag, const std::string &str="", typename std::enable_if<(is_linked_cell_list< LinkedCellType >::value), int >::type *=0)
 Execute functor in parallel according to the execution policy over particles with thread-local serial loops over linked cell list bins and particle first neighbors in those bins.
 
template<class FunctorType, class LinkedCellType, class... ExecParameters>
void Cabana::neighbor_parallel_for (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const LinkedCellType &list, const FirstNeighborsTag, const TeamOpTag, const std::string &str="", typename std::enable_if<(is_linked_cell_list< LinkedCellType >::value), int >::type *=0)
 Execute functor in parallel according to the execution policy over particles with thread-local serial loops over linked cell list bins and team threading over particle first neighbors in those bins.
 
template<class FunctorType, class LinkedCellType, class ReduceType, class... ExecParameters>
void Cabana::neighbor_parallel_reduce (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const LinkedCellType &list, const FirstNeighborsTag, const SerialOpTag, ReduceType &reduce_val, const std::string &str="", typename std::enable_if<(is_linked_cell_list< LinkedCellType >::value), int >::type *=0)
 Execute functor in parallel according to the execution policy over particles with thread-local serial loops over linked cell list bins and particle first neighbors in those bins.
 
template<class FunctorType, class LinkedCellType, class ReduceType, class... ExecParameters>
void Cabana::neighbor_parallel_reduce (const Kokkos::RangePolicy< ExecParameters... > &exec_policy, const FunctorType &functor, const LinkedCellType &list, const FirstNeighborsTag, const TeamOpTag, ReduceType &reduce_val, const std::string &str="", typename std::enable_if<(is_linked_cell_list< LinkedCellType >::value), int >::type *=0)
 Execute functor in parallel according to the execution policy over particles with thread-local serial loops over linked cell list bins and team threading over particle first neighbors in those bins.
 

Detailed Description

SIMD and neighbor extension of Kokkos parallel iteration.