CMS 3D CMS Logo

Classes | Namespaces | Typedefs | Functions | Variables
workdivision.h File Reference
#include <type_traits>
#include <alpaka/alpaka.hpp>
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"
#include "HeterogeneousCore/AlpakaInterface/interface/traits.h"

Go to the source code of this file.

Classes

struct  cms::alpakatools::elements_with_stride_nd< TAcc, typename >::at_end_t
 
class  cms::alpakatools::blocks_with_stride< TAcc, typename >
 
class  cms::alpakatools::independent_group_elements< TAcc, typename >::const_iterator
 
class  cms::alpakatools::independent_groups< TAcc, typename >::const_iterator
 
class  cms::alpakatools::elements_in_block< TAcc, typename >::const_iterator
 
class  cms::alpakatools::blocks_with_stride< TAcc, typename >::const_iterator
 
class  cms::alpakatools::elements_with_stride_nd< TAcc, typename >::const_iterator
 
class  cms::alpakatools::elements_with_stride< TAcc, typename >::const_iterator
 
struct  cms::alpakatools::ElementIndex
 
class  cms::alpakatools::elements_in_block< TAcc, typename >
 
class  cms::alpakatools::elements_with_stride< TAcc, typename >
 
class  cms::alpakatools::elements_with_stride_nd< TAcc, typename >
 
class  cms::alpakatools::independent_group_elements< TAcc, typename >
 
class  cms::alpakatools::independent_groups< TAcc, typename >
 
struct  cms::alpakatools::requires_single_thread_per_block< TAcc, typename >
 

Namespaces

 cms::alpakatools
 

Typedefs

template<typename TAcc , typename = std::enable_if_t<alpaka::isAccelerator<TAcc> and alpaka::Dim<TAcc>::value == 1>>
using cms::alpakatools::uniform_group_elements = elements_in_block< TAcc >
 
template<typename TAcc , typename = std::enable_if_t<alpaka::isAccelerator<TAcc> and alpaka::Dim<TAcc>::value == 1>>
using cms::alpakatools::uniform_groups = blocks_with_stride< TAcc >
 

Functions

constexpr Idx cms::alpakatools::divide_up_by (Idx value, Idx divisor)
 
template<typename TAcc >
ALPAKA_FN_ACC std::pair< Idx, Idxcms::alpakatools::element_index_range_in_block (const TAcc &acc, const Idx elementIdxShift, const unsigned int dimIndex=0u)
 
template<typename TAcc >
ALPAKA_FN_ACC std::pair< Idx, Idxcms::alpakatools::element_index_range_in_block_truncated (const TAcc &acc, const Idx maxNumberOfElements, const Idx elementIdxShift, const unsigned int dimIndex=0u)
 
template<typename TAcc >
ALPAKA_FN_ACC std::pair< Idx, Idxcms::alpakatools::element_index_range_in_grid (const TAcc &acc, Idx elementIdxShift, const unsigned int dimIndex=0u)
 
template<typename TAcc , typename Func >
ALPAKA_FN_ACC void cms::alpakatools::for_each_element_in_block (const TAcc &acc, const Idx maxNumberOfElements, const Idx elementIdxShift, const Func func, const unsigned int dimIndex=0)
 
template<typename TAcc , typename Func >
ALPAKA_FN_ACC void cms::alpakatools::for_each_element_in_block (const TAcc &acc, const Idx maxNumberOfElements, const Func func, const unsigned int dimIndex=0)
 
template<typename TAcc , typename Func >
ALPAKA_FN_ACC void cms::alpakatools::for_each_element_in_block_strided (const TAcc &acc, const Idx maxNumberOfElements, const Idx elementIdxShift, const Func func, const unsigned int dimIndex=0)
 
template<typename TAcc , typename Func >
ALPAKA_FN_ACC void cms::alpakatools::for_each_element_in_block_strided (const TAcc &acc, const Idx maxNumberOfElements, const Func func, const unsigned int dimIndex=0)
 
template<typename TAcc , typename Func >
ALPAKA_FN_ACC void cms::alpakatools::for_each_element_in_grid_strided (const TAcc &acc, const Idx maxNumberOfElements, const Idx elementIdxShift, const Func func, const unsigned int dimIndex=0)
 
template<typename TAcc , typename Func >
ALPAKA_FN_ACC void cms::alpakatools::for_each_element_in_grid_strided (const TAcc &acc, const Idx maxNumberOfElements, const Func func, const unsigned int dimIndex=0)
 
template<typename TAcc , typename = std::enable_if_t<alpaka::isAccelerator<TAcc> and alpaka::Dim<TAcc>::value == 1>>
WorkDiv< Dim1Dcms::alpakatools::make_workdiv (Idx blocks, Idx elements)
 
template<typename TAcc , typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
WorkDiv< alpaka::Dim< TAcc > > cms::alpakatools::make_workdiv (const Vec< alpaka::Dim< TAcc >> &blocks, const Vec< alpaka::Dim< TAcc >> &elements)
 
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool cms::alpakatools::next_valid_element_index_strided (Idx &i, Idx &firstElementIdx, Idx &endElementIdx, const Idx stride, const Idx maxNumberOfElements)
 
template<typename TAcc , typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
ALPAKA_FN_ACC constexpr bool cms::alpakatools::once_per_block (TAcc const &acc)
 
template<typename TAcc , typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
ALPAKA_FN_ACC constexpr bool cms::alpakatools::once_per_grid (TAcc const &acc)
 
constexpr Idx cms::alpakatools::round_up_by (Idx value, Idx divisor)
 

Variables

template<typename TAcc , typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
constexpr bool cms::alpakatools::requires_single_thread_per_block_v = requires_single_thread_per_block<TAcc>::value