DPC++ Runtime
Runtime libraries for oneAPI DPC++
group_algorithm.hpp File Reference
Include dependency graph for group_algorithm.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sycl::_V1::detail::is_native_op< T, BinaryOperation >
 
struct  sycl::_V1::detail::is_complex< T >
 

Namespaces

 sycl
 ---— Error handling, matching OpenCL plugin semantics.
 
 sycl::_V1
 
 sycl::_V1::detail
 

Typedefs

template<typename T >
using sycl::_V1::detail::native_op_list = type_list< sycl::plus< T >, sycl::bit_or< T >, sycl::bit_xor< T >, sycl::bit_and< T >, sycl::maximum< T >, sycl::minimum< T >, sycl::multiplies< T > >
 
template<typename T , typename BinaryOperation >
using sycl::_V1::detail::is_plus = std::integral_constant< bool, std::is_same< BinaryOperation, sycl::plus< T > >::value||std::is_same< BinaryOperation, sycl::plus< void > >::value >
 
template<typename T >
using sycl::_V1::detail::is_arithmetic_or_complex = std::integral_constant< bool, sycl::detail::is_complex< T >::value||sycl::detail::is_arithmetic< T >::value >
 
template<typename T , typename BinaryOperation >
using sycl::_V1::detail::is_plus_if_complex = std::integral_constant< bool,(is_complex< T >::value ? is_plus< T, BinaryOperation >::value :std::true_type::value)>
 

Functions

template<int Dimensions>
id< Dimensions > sycl::_V1::detail::linear_id_to_id (range< Dimensions >, size_t linear_id)
 
template<>
id< 1 > sycl::_V1::detail::linear_id_to_id (range< 1 >, size_t linear_id)
 
template<>
id< 2 > sycl::_V1::detail::linear_id_to_id (range< 2 > r, size_t linear_id)
 
template<>
id< 3 > sycl::_V1::detail::linear_id_to_id (range< 3 > r, size_t linear_id)
 
template<typename Group >
size_t sycl::_V1::detail::get_local_linear_range (Group g)
 
template<>
size_t sycl::_V1::detail::get_local_linear_range< group< 1 > > (group< 1 > g)
 
template<>
size_t sycl::_V1::detail::get_local_linear_range< group< 2 > > (group< 2 > g)
 
template<>
size_t sycl::_V1::detail::get_local_linear_range< group< 3 > > (group< 3 > g)
 
template<>
size_t sycl::_V1::detail::get_local_linear_range< ext::oneapi::sub_group > (ext::oneapi::sub_group g)
 
template<typename Group >
Group::linear_id_type sycl::_V1::detail::get_local_linear_id (Group g)
 
template<>
ext::oneapi::sub_group::linear_id_type sycl::_V1::detail::get_local_linear_id< ext::oneapi::sub_group > (ext::oneapi::sub_group g)
 
template<typename T , class BinaryOperation >
constexpr detail::enable_if_t<(is_complex< T >::value &&is_plus< T, BinaryOperation >::value), T > sycl::_V1::detail::identity_for_ga_op ()
 
template<typename T , class BinaryOperation >
constexpr detail::enable_if_t<!is_complex< T >::value, T > sycl::_V1::detail::identity_for_ga_op ()
 
template<typename Group , typename Ptr , class Function >
Function sycl::_V1::detail::for_each (Group g, Ptr first, Ptr last, Function f)
 
template<typename Group , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_scalar_arithmetic< T >::value &&detail::is_native_op< T, BinaryOperation >::value), T > sycl::_V1::reduce_over_group (Group, T x, BinaryOperation binary_op)
 
template<typename Group , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_complex< T >::value &&detail::is_native_op< T, sycl::plus< T >>::value &&detail::is_plus< T, BinaryOperation >::value), T > sycl::_V1::reduce_over_group (Group g, T x, BinaryOperation binary_op)
 
template<typename Group , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_vector_arithmetic< T >::value &&detail::is_native_op< T, BinaryOperation >::value), T > sycl::_V1::reduce_over_group (Group g, T x, BinaryOperation binary_op)
 
template<typename Group , typename V , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&(detail::is_scalar_arithmetic< V >::value||detail::is_complex< V >::value) &&(detail::is_scalar_arithmetic< T >::value||detail::is_complex< T >::value) &&detail::is_native_op< V, BinaryOperation >::value &&detail::is_native_op< T, BinaryOperation >::value &&detail::is_plus_if_complex< T, BinaryOperation >::value &&detail::is_plus_if_complex< V, BinaryOperation >::value), T > sycl::_V1::reduce_over_group (Group g, V x, T init, BinaryOperation binary_op)
 
template<typename Group , typename V , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_vector_arithmetic< V >::value &&detail::is_vector_arithmetic< T >::value &&detail::is_native_op< V, BinaryOperation >::value &&detail::is_native_op< T, BinaryOperation >::value), T > sycl::_V1::reduce_over_group (Group g, V x, T init, BinaryOperation binary_op)
 
template<typename Group , typename Ptr , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer< Ptr >::value &&detail::is_arithmetic_or_complex< typename detail::remove_pointer< Ptr >::type >::value &&detail::is_plus_if_complex< typename detail::remove_pointer< Ptr >::type, BinaryOperation >::value), typename detail::remove_pointer< Ptr >::type > sycl::_V1::joint_reduce (Group g, Ptr first, Ptr last, BinaryOperation binary_op)
 
template<typename Group , typename Ptr , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer< Ptr >::value &&detail::is_arithmetic_or_complex< typename detail::remove_pointer< Ptr >::type >::value &&detail::is_arithmetic_or_complex< T >::value &&detail::is_native_op< typename detail::remove_pointer< Ptr >::type, BinaryOperation >::value &&detail::is_plus_if_complex< typename detail::remove_pointer< Ptr >::type, BinaryOperation >::value &&detail::is_plus_if_complex< T, BinaryOperation >::value &&detail::is_native_op< T, BinaryOperation >::value), T > sycl::_V1::joint_reduce (Group g, Ptr first, Ptr last, T init, BinaryOperation binary_op)
 
template<typename Group >
detail::enable_if_t< is_group_v< std::decay_t< Group > >, bool > sycl::_V1::any_of_group (Group, bool pred)
 
template<typename Group , typename T , class Predicate >
detail::enable_if_t< is_group_v< Group >, bool > sycl::_V1::any_of_group (Group g, T x, Predicate pred)
 
template<typename Group , typename Ptr , class Predicate >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer< Ptr >::value), bool > sycl::_V1::joint_any_of (Group g, Ptr first, Ptr last, Predicate pred)
 
template<typename Group >
detail::enable_if_t< is_group_v< std::decay_t< Group > >, bool > sycl::_V1::all_of_group (Group, bool pred)
 
template<typename Group , typename T , class Predicate >
detail::enable_if_t< is_group_v< std::decay_t< Group > >, bool > sycl::_V1::all_of_group (Group g, T x, Predicate pred)
 
template<typename Group , typename Ptr , class Predicate >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer< Ptr >::value), bool > sycl::_V1::joint_all_of (Group g, Ptr first, Ptr last, Predicate pred)
 
template<typename Group >
detail::enable_if_t< is_group_v< std::decay_t< Group > >, bool > sycl::_V1::none_of_group (Group, bool pred)
 
template<typename Group , typename T , class Predicate >
detail::enable_if_t< is_group_v< std::decay_t< Group > >, bool > sycl::_V1::none_of_group (Group g, T x, Predicate pred)
 
template<typename Group , typename Ptr , class Predicate >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer< Ptr >::value), bool > sycl::_V1::joint_none_of (Group g, Ptr first, Ptr last, Predicate pred)
 
template<typename Group , typename T >
detail::enable_if_t<(std::is_same< std::decay_t< Group >, sub_group >::value &&(std::is_trivially_copyable< T >::value||detail::is_vec< T >::value)), T > sycl::_V1::shift_group_left (Group, T x, typename Group::linear_id_type delta=1)
 
template<typename Group , typename T >
detail::enable_if_t<(std::is_same< std::decay_t< Group >, sub_group >::value &&(std::is_trivially_copyable< T >::value||detail::is_vec< T >::value)), T > sycl::_V1::shift_group_right (Group, T x, typename Group::linear_id_type delta=1)
 
template<typename Group , typename T >
detail::enable_if_t<(std::is_same< std::decay_t< Group >, sub_group >::value &&(std::is_trivially_copyable< T >::value||detail::is_vec< T >::value)), T > sycl::_V1::permute_group_by_xor (Group, T x, typename Group::linear_id_type mask)
 
template<typename Group , typename T >
detail::enable_if_t<(std::is_same< std::decay_t< Group >, sub_group >::value &&(std::is_trivially_copyable< T >::value||detail::is_vec< T >::value)), T > sycl::_V1::select_from_group (Group, T x, typename Group::id_type local_id)
 
template<typename Group , typename T >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&(std::is_trivially_copyable< T >::value||detail::is_vec< T >::value)), T > sycl::_V1::group_broadcast (Group, T x, typename Group::id_type local_id)
 
template<typename Group , typename T >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&(std::is_trivially_copyable< T >::value||detail::is_vec< T >::value)), T > sycl::_V1::group_broadcast (Group g, T x, typename Group::linear_id_type linear_local_id)
 
template<typename Group , typename T >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&(std::is_trivially_copyable< T >::value||detail::is_vec< T >::value)), T > sycl::_V1::group_broadcast (Group g, T x)
 
template<typename Group , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_scalar_arithmetic< T >::value &&detail::is_native_op< T, BinaryOperation >::value), T > sycl::_V1::exclusive_scan_over_group (Group, T x, BinaryOperation binary_op)
 
template<typename Group , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_complex< T >::value &&detail::is_native_op< T, sycl::plus< T >>::value &&detail::is_plus< T, BinaryOperation >::value), T > sycl::_V1::exclusive_scan_over_group (Group g, T x, BinaryOperation binary_op)
 
template<typename Group , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_vector_arithmetic< T >::value &&detail::is_native_op< T, BinaryOperation >::value), T > sycl::_V1::exclusive_scan_over_group (Group g, T x, BinaryOperation binary_op)
 
template<typename Group , typename V , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_vector_arithmetic< V >::value &&detail::is_vector_arithmetic< T >::value &&detail::is_native_op< V, BinaryOperation >::value &&detail::is_native_op< T, BinaryOperation >::value), T > sycl::_V1::exclusive_scan_over_group (Group g, V x, T init, BinaryOperation binary_op)
 
template<typename Group , typename V , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&(detail::is_scalar_arithmetic< V >::value||detail::is_complex< V >::value) &&(detail::is_scalar_arithmetic< T >::value||detail::is_complex< T >::value) &&detail::is_native_op< V, BinaryOperation >::value &&detail::is_native_op< T, BinaryOperation >::value &&detail::is_plus_if_complex< V, BinaryOperation >::value &&detail::is_plus_if_complex< T, BinaryOperation >::value), T > sycl::_V1::exclusive_scan_over_group (Group g, V x, T init, BinaryOperation binary_op)
 
template<typename Group , typename InPtr , typename OutPtr , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer< InPtr >::value &&detail::is_pointer< OutPtr >::value &&detail::is_arithmetic_or_complex< typename detail::remove_pointer< InPtr >::type >::value &&detail::is_arithmetic_or_complex< T >::value &&detail::is_native_op< typename detail::remove_pointer< InPtr >::type, BinaryOperation >::value &&detail::is_native_op< T, BinaryOperation >::value &&detail::is_plus_if_complex< typename detail::remove_pointer< InPtr >::type, BinaryOperation >::value &&detail::is_plus_if_complex< T, BinaryOperation >::value), OutPtr > sycl::_V1::joint_exclusive_scan (Group g, InPtr first, InPtr last, OutPtr result, T init, BinaryOperation binary_op)
 
template<typename Group , typename InPtr , typename OutPtr , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer< InPtr >::value &&detail::is_pointer< OutPtr >::value &&detail::is_arithmetic_or_complex< typename detail::remove_pointer< InPtr >::type >::value &&detail::is_native_op< typename detail::remove_pointer< InPtr >::type, BinaryOperation >::value &&detail::is_plus_if_complex< typename detail::remove_pointer< InPtr >::type, BinaryOperation >::value), OutPtr > sycl::_V1::joint_exclusive_scan (Group g, InPtr first, InPtr last, OutPtr result, BinaryOperation binary_op)
 
template<typename Group , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_vector_arithmetic< T >::value &&detail::is_native_op< T, BinaryOperation >::value), T > sycl::_V1::inclusive_scan_over_group (Group g, T x, BinaryOperation binary_op)
 
template<typename Group , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_scalar_arithmetic< T >::value &&detail::is_native_op< T, BinaryOperation >::value), T > sycl::_V1::inclusive_scan_over_group (Group, T x, BinaryOperation binary_op)
 
template<typename Group , typename T , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_complex< T >::value &&detail::is_native_op< T, sycl::plus< T >>::value &&detail::is_plus< T, BinaryOperation >::value), T > sycl::_V1::inclusive_scan_over_group (Group g, T x, BinaryOperation binary_op)
 
template<typename Group , typename V , class BinaryOperation , typename T >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&(detail::is_scalar_arithmetic< V >::value||detail::is_complex< V >::value) &&(detail::is_scalar_arithmetic< T >::value||detail::is_complex< T >::value) &&detail::is_native_op< V, BinaryOperation >::value &&detail::is_native_op< T, BinaryOperation >::value &&detail::is_plus_if_complex< T, BinaryOperation >::value &&detail::is_plus_if_complex< V, BinaryOperation >::value), T > sycl::_V1::inclusive_scan_over_group (Group g, V x, BinaryOperation binary_op, T init)
 
template<typename Group , typename V , class BinaryOperation , typename T >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_vector_arithmetic< V >::value &&detail::is_vector_arithmetic< T >::value &&detail::is_native_op< V, BinaryOperation >::value &&detail::is_native_op< T, BinaryOperation >::value), T > sycl::_V1::inclusive_scan_over_group (Group g, V x, BinaryOperation binary_op, T init)
 
template<typename Group , typename InPtr , typename OutPtr , class BinaryOperation , typename T >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer< InPtr >::value &&detail::is_pointer< OutPtr >::value &&detail::is_arithmetic_or_complex< typename detail::remove_pointer< InPtr >::type >::value &&detail::is_arithmetic_or_complex< T >::value &&detail::is_native_op< typename detail::remove_pointer< InPtr >::type, BinaryOperation >::value &&detail::is_native_op< T, BinaryOperation >::value &&detail::is_plus_if_complex< typename detail::remove_pointer< InPtr >::type, BinaryOperation >::value &&detail::is_plus_if_complex< T, BinaryOperation >::value), OutPtr > sycl::_V1::joint_inclusive_scan (Group g, InPtr first, InPtr last, OutPtr result, BinaryOperation binary_op, T init)
 
template<typename Group , typename InPtr , typename OutPtr , class BinaryOperation >
detail::enable_if_t<(is_group_v< std::decay_t< Group >> &&detail::is_pointer< InPtr >::value &&detail::is_pointer< OutPtr >::value &&detail::is_arithmetic_or_complex< typename detail::remove_pointer< InPtr >::type >::value &&detail::is_native_op< typename detail::remove_pointer< InPtr >::type, BinaryOperation >::value &&detail::is_plus_if_complex< typename detail::remove_pointer< InPtr >::type, BinaryOperation >::value), OutPtr > sycl::_V1::joint_inclusive_scan (Group g, InPtr first, InPtr last, OutPtr result, BinaryOperation binary_op)