DPC++ Runtime
Runtime libraries for oneAPI DPC++
invoke_simd.hpp File Reference
#include <sycl/ext/oneapi/experimental/detail/invoke_simd_types.hpp>
#include <sycl/ext/oneapi/experimental/uniform.hpp>
#include <sycl/detail/boost/mp11.hpp>
#include <sycl/sub_group.hpp>
#include <functional>
Include dependency graph for invoke_simd.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sycl::_V1::ext::oneapi::experimental::detail::spmd2simd< uniform< T >, N >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::spmd2simd< std::tuple< T... >, N >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::spmd2simd< T, N, std::enable_if_t< std::is_arithmetic_v< T > > >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::spmd2simd< bool, N >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::simd2spmd< uniform< T > >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::simd2spmd< simd< T, N > >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::simd2spmd< std::tuple< T... > >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::simd2spmd< T, std::enable_if_t< std::is_arithmetic_v< T > > >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::simd2spmd< simd_mask< T, N > >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::simd2spmd< void >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::simd_size< T >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::simd_size< simd< T, N > >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::is_uniform_type< T >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::is_uniform_type< uniform< T > >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::is_simd_or_mask_type< T >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::is_simd_or_mask_type< simd< T, N > >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::is_simd_or_mask_type< simd_mask< T, N > >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::all_uniform_types< SpmdArgs >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::unwrap_uniform< T >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::unwrap_uniform< uniform< T > >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::sg_size< SimdCallable, SpmdArgs >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::remove_ref_from_func_ptr_ref_type< Callable >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::remove_ref_from_func_ptr_ref_type< Ret(*&)(Args...)>
 
struct  sycl::_V1::ext::oneapi::experimental::detail::remove_ref_from_func_ptr_ref_type< Ret(__regcall *&)(Args...)>
 
struct  sycl::_V1::ext::oneapi::experimental::detail::strip_regcall_from_function_ptr< Ret(*)(Args...)>
 
struct  sycl::_V1::ext::oneapi::experimental::detail::strip_regcall_from_function_ptr< Ret(__regcall *)(Args...)>
 
struct  sycl::_V1::ext::oneapi::experimental::detail::is_non_trivially_copyable_uniform< T >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::is_non_trivially_copyable_uniform< void >
 

Namespaces

 sycl
 
 sycl::_V1
 
 sycl::_V1::ext
 
 sycl::_V1::ext::oneapi
 
 sycl::_V1::ext::oneapi::experimental
 
 sycl::_V1::ext::oneapi::experimental::detail
 

Typedefs

template<int N, class SimdCallable , class... SpmdArgs>
using sycl::_V1::ext::oneapi::experimental::detail::SimdRetType = std::invoke_result_t< SimdCallable, typename spmd2simd< SpmdArgs, N >::type... >
 
template<int N, class SimdCallable , class... SpmdArgs>
using sycl::_V1::ext::oneapi::experimental::detail::SpmdRetType = typename simd2spmd< SimdRetType< N, SimdCallable, SpmdArgs... > >::type
 
template<typename T >
using sycl::_V1::ext::oneapi::experimental::detail::remove_ref_from_func_ptr_ref_type_t = typename remove_ref_from_func_ptr_ref_type< T >::type
 
template<typename T >
using sycl::_V1::ext::oneapi::experimental::detail::strip_regcall_from_function_ptr_t = typename strip_regcall_from_function_ptr< T >::type
 

Functions

template<bool IsFunc, class SpmdRet , class HelperFunc , class... UserSimdFuncAndSpmdArgs, class = std::enable_if_t<!IsFunc>>
__DPCPP_SYCL_EXTERNAL __regcall SpmdRet __builtin_invoke_simd (HelperFunc helper, const void *obj, UserSimdFuncAndSpmdArgs... args)
 Middle End - to - Back End interface to invoke explicit SIMD functions from SPMD SYCL context. More...
 
template<bool IsFunc, class SpmdRet , class HelperFunc , class... UserSimdFuncAndSpmdArgs, class = std::enable_if_t<IsFunc>>
__DPCPP_SYCL_EXTERNAL __regcall SpmdRet __builtin_invoke_simd (HelperFunc helper, UserSimdFuncAndSpmdArgs... args)
 
template<auto SgSize, typename SimdRet >
constexpr void sycl::_V1::ext::oneapi::experimental::detail::verify_return_type_matches_sg_size ()
 
template<class SimdCallable , class... SpmdArgs>
static constexpr int sycl::_V1::ext::oneapi::experimental::detail::get_sg_size ()
 
template<int N, class Callable , class... T>
__DPCPP_SYCL_EXTERNAL __regcall detail::SimdRetType< N, Callable, T... > sycl::_V1::ext::oneapi::experimental::detail::simd_obj_call_helper (const void *obj_ptr, typename detail::spmd2simd< T, N >::type... simd_args)
 
template<int N, class Callable , class... T>
__DPCPP_SYCL_EXTERNAL __regcall detail::SimdRetType< N, Callable, T... > sycl::_V1::ext::oneapi::experimental::detail::simd_func_call_helper (Callable f, typename detail::spmd2simd< T, N >::type... simd_args)
 
template<typename Ret , typename... Args>
constexpr bool sycl::_V1::ext::oneapi::experimental::detail::has_ref_arg (Ret(*)(Args...))
 
template<typename Ret , typename... Args>
constexpr bool sycl::_V1::ext::oneapi::experimental::detail::has_ref_ret (Ret(*)(Args...))
 
template<typename Ret , typename... Args>
constexpr bool sycl::_V1::ext::oneapi::experimental::detail::has_non_uniform_struct_ret (Ret(*)(Args...))
 
template<typename Ret , typename... Args>
constexpr bool sycl::_V1::ext::oneapi::experimental::detail::has_non_trivially_copyable_uniform_ret (Ret(*)(Args...))
 
template<class Callable >
constexpr void sycl::_V1::ext::oneapi::experimental::detail::verify_callable ()
 
template<class... Ts>
constexpr void sycl::_V1::ext::oneapi::experimental::detail::verify_no_uniform_non_trivially_copyable_args ()
 
template<class... Ts>
constexpr void sycl::_V1::ext::oneapi::experimental::detail::verify_no_non_uniform_struct_args ()
 
template<class Callable , class... Ts>
constexpr void sycl::_V1::ext::oneapi::experimental::detail::verify_valid_args_and_ret ()
 
template<class Callable , class... T>
 sycl::_V1::ext::oneapi::experimental::__attribute__ ((always_inline)) auto invoke_simd(sycl
 The invoke_simd free function invokes a SIMD function using all work-items in a sub_group. More...
 

Variables

template<class Callable >
static constexpr bool sycl::_V1::ext::oneapi::experimental::detail::is_function_ptr_or_ref_v
 
template<typename T >
constexpr bool sycl::_V1::ext::oneapi::experimental::detail::is_non_trivially_copyable_uniform_v
 

Function Documentation

◆ __builtin_invoke_simd() [1/2]

template<bool IsFunc, class SpmdRet , class HelperFunc , class... UserSimdFuncAndSpmdArgs, class = std::enable_if_t<!IsFunc>>
__DPCPP_SYCL_EXTERNAL __regcall SpmdRet __builtin_invoke_simd ( HelperFunc  helper,
const void *  obj,
UserSimdFuncAndSpmdArgs...  args 
)

Middle End - to - Back End interface to invoke explicit SIMD functions from SPMD SYCL context.

Must not be used by user code. BEs are expected to recognize this intrinsic and transform the intrinsic call with a direct call to the SIMD target, as well as process SPMD arguments in the way described in the specification for invoke_simd.

Template Parameters
SpmdRetthe return type. Can be uniform<T>.
HelperFuncthe type of SIMD callee helper function. It is needed to convert the arguments of user's callee function and pass them to call of user's function.
UserSimdFuncAndSpmdArgsis the pack that contains the user's SIMD target function and the original SPMD arguments passed to invoke_simd.

Definition at line 40 of file invoke_simd.hpp.

Referenced by sycl::_V1::ext::oneapi::experimental::__attribute__().

◆ __builtin_invoke_simd() [2/2]

template<bool IsFunc, class SpmdRet , class HelperFunc , class... UserSimdFuncAndSpmdArgs, class = std::enable_if_t<IsFunc>>
__DPCPP_SYCL_EXTERNAL __regcall SpmdRet __builtin_invoke_simd ( HelperFunc  helper,
UserSimdFuncAndSpmdArgs...  args 
)

Definition at line 55 of file invoke_simd.hpp.