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  cl::sycl::detail::is_native_op< T, BinaryOperation >
 
struct  cl::sycl::detail::is_complex< T >
 
struct  cl::sycl::detail::group_barrier_scope< G >
 
struct  cl::sycl::detail::group_barrier_scope< sycl::sub_group >
 
struct  cl::sycl::detail::group_barrier_scope< sycl::group< D > >
 

Namespaces

 cl
 We provide new interfaces for matrix muliply in this patch:
 
 cl::sycl
 
 cl::sycl::detail
 

Typedefs

template<typename T >
using cl::sycl::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 cl::sycl::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 cl::sycl::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 cl::sycl::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 > cl::sycl::detail::linear_id_to_id (range< Dimensions >, size_t linear_id)
 
template<>
id< 1 > cl::sycl::detail::linear_id_to_id (range< 1 >, size_t linear_id)
 
template<>
id< 2 > cl::sycl::detail::linear_id_to_id (range< 2 > r, size_t linear_id)
 
template<>
id< 3 > cl::sycl::detail::linear_id_to_id (range< 3 > r, size_t linear_id)
 
template<typename Group >
size_t cl::sycl::detail::get_local_linear_range (Group g)
 
template<>
size_t cl::sycl::detail::get_local_linear_range< group< 1 > > (group< 1 > g)
 
template<>
size_t cl::sycl::detail::get_local_linear_range< group< 2 > > (group< 2 > g)
 
template<>
size_t cl::sycl::detail::get_local_linear_range< group< 3 > > (group< 3 > g)
 
template<>
size_t cl::sycl::detail::get_local_linear_range< ext::oneapi::sub_group > (ext::oneapi::sub_group g)
 
template<typename Group >
Group::linear_id_type cl::sycl::detail::get_local_linear_id (Group g)
 
template<>
ext::oneapi::sub_group::linear_id_type cl::sycl::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), Tcl::sycl::detail::identity_for_ga_op ()
 
template<typename T , class BinaryOperation >
constexpr detail::enable_if_t<!is_complex< T >::value, Tcl::sycl::detail::identity_for_ga_op ()
 
template<typename Group , typename Ptr , class Function >
Function cl::sycl::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), Tcl::sycl::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), Tcl::sycl::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), Tcl::sycl::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), Tcl::sycl::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), Tcl::sycl::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 > cl::sycl::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), Tcl::sycl::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 > cl::sycl::any_of_group (Group, bool pred)
 
template<typename Group , typename T , class Predicate >
detail::enable_if_t< is_group_v< Group >, bool > cl::sycl::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 > cl::sycl::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 > cl::sycl::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 > cl::sycl::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 > cl::sycl::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 > cl::sycl::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 > cl::sycl::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 > cl::sycl::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)), Tcl::sycl::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)), Tcl::sycl::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)), Tcl::sycl::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)), Tcl::sycl::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)), Tcl::sycl::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)), Tcl::sycl::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)), Tcl::sycl::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), Tcl::sycl::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), Tcl::sycl::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), Tcl::sycl::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), Tcl::sycl::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), Tcl::sycl::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 > cl::sycl::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 > cl::sycl::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), Tcl::sycl::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), Tcl::sycl::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), Tcl::sycl::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), Tcl::sycl::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), Tcl::sycl::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 > cl::sycl::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 > cl::sycl::joint_inclusive_scan (Group g, InPtr first, InPtr last, OutPtr result, BinaryOperation binary_op)
 
template<typename Group >
std::enable_if< is_group_v< Group > >::type cl::sycl::group_barrier (Group, memory_scope FenceScope=Group::fence_scope)