DPC++ Runtime
Runtime libraries for oneAPI DPC++
invoke_simd.hpp File Reference
#include <sycl/ext/oneapi/experimental/uniform.hpp>
#include <CL/sycl/sub_group.hpp>
#include <std/experimental/simd.hpp>
#include <sycl/detail/boost/mp11.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::ext::oneapi::experimental::detail::spmd2simd< T, N, class >
 
struct  sycl::ext::oneapi::experimental::detail::spmd2simd< uniform< T >, N >
 
struct  sycl::ext::oneapi::experimental::detail::spmd2simd< std::tuple< T... >, N >
 
struct  sycl::ext::oneapi::experimental::detail::spmd2simd< T, N, std::enable_if_t< std::is_arithmetic_v< T > > >
 
struct  sycl::ext::oneapi::experimental::detail::simd2spmd< class, class >
 
struct  sycl::ext::oneapi::experimental::detail::simd2spmd< uniform< T > >
 
struct  sycl::ext::oneapi::experimental::detail::simd2spmd< simd< T, N > >
 
struct  sycl::ext::oneapi::experimental::detail::simd2spmd< std::tuple< T... > >
 
struct  sycl::ext::oneapi::experimental::detail::simd2spmd< T, std::enable_if_t< std::is_arithmetic_v< T > > >
 
struct  sycl::ext::oneapi::experimental::detail::is_uniform_type< T >
 
struct  sycl::ext::oneapi::experimental::detail::is_uniform_type< uniform< T > >
 
struct  sycl::ext::oneapi::experimental::detail::is_simd_or_mask_type< T >
 
struct  sycl::ext::oneapi::experimental::detail::is_simd_or_mask_type< simd< T, N > >
 
struct  sycl::ext::oneapi::experimental::detail::is_simd_or_mask_type< simd_mask< T, N > >
 
struct  sycl::ext::oneapi::experimental::detail::has_uniform_signature< SimdCallable, SpmdArgs >
 
struct  sycl::ext::oneapi::experimental::detail::unwrap_uniform< T >
 
struct  sycl::ext::oneapi::experimental::detail::unwrap_uniform< uniform< T > >
 
struct  sycl::ext::oneapi::experimental::detail::sg_size< SimdCallable, SpmdArgs >
 

Namespaces

 sycl
 
 sycl::ext
 
 sycl::ext::oneapi
 
 sycl::ext::oneapi::experimental
 
 sycl::ext::oneapi::experimental::simd_abi
 
 sycl::ext::oneapi::experimental::detail
 

Macros

#define SYCL_EXT_ONEAPI_INVOKE_SIMD   1
 

Typedefs

template<class T , int N>
using sycl::ext::oneapi::experimental::simd_abi::native_fixed_size = typename std::experimental::__simd_abi< std::experimental::_StorageKind::_VecExt, N >
 
template<class T , int N>
using sycl::ext::oneapi::experimental::simd = std::experimental::simd< T, simd_abi::native_fixed_size< T, N > >
 
template<class T , int N>
using sycl::ext::oneapi::experimental::simd_mask = std::experimental::simd_mask< T, simd_abi::native_fixed_size< T, N > >
 
template<int N, class SimdCallable , class... SpmdArgs>
using sycl::ext::oneapi::experimental::detail::SimdRetType = std::invoke_result_t< SimdCallable, typename spmd2simd< SpmdArgs, N >::type... >
 
template<int N, class SimdCallable , class... SpmdArgs>
using sycl::ext::oneapi::experimental::detail::SpmdRetType = typename simd2spmd< SimdRetType< N, SimdCallable, SpmdArgs... > >::type
 

Functions

template<bool IsFunc, class SpmdRet , class SimdCallee , class... SpmdArgs, class = std::enable_if_t<!IsFunc>>
SYCL_EXTERNAL __regcall SpmdRet __builtin_invoke_simd (SimdCallee target, const void *obj, SpmdArgs... args)
 Middle End - to - Back End interface to invoke explicit SIMD functions from SPMD SYCL context. More...
 
template<bool IsFunc, class SpmdRet , class SimdCallee , class... SpmdArgs, class = std::enable_if_t<IsFunc>>
SYCL_EXTERNAL __regcall SpmdRet __builtin_invoke_simd (SimdCallee target, SpmdArgs... args)
 
template<class SimdCallable , class... SpmdArgs>
static constexpr int sycl::ext::oneapi::experimental::detail::get_sg_size ()
 
template<int N, class Callable , class... T>
__regcall detail::SimdRetType< N, Callable, T... > sycl::ext::oneapi::experimental::detail::simd_call_helper (const void *obj_ptr, typename detail::spmd2simd< T, N >::type... simd_args)
 
template<class Callable , class... T>
 sycl::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::ext::oneapi::experimental::detail::is_function_ptr_or_ref_v
 

Macro Definition Documentation

◆ SYCL_EXT_ONEAPI_INVOKE_SIMD

#define SYCL_EXT_ONEAPI_INVOKE_SIMD   1

Definition at line 16 of file invoke_simd.hpp.

Function Documentation

◆ __builtin_invoke_simd() [1/2]

template<bool IsFunc, class SpmdRet , class SimdCallee , class... SpmdArgs, class = std::enable_if_t<!IsFunc>>
SYCL_EXTERNAL __regcall SpmdRet __builtin_invoke_simd ( SimdCallee  target,
const void *  obj,
SpmdArgs...  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>.
SimdCalleethe type of the SIMD callee function (the "target"). Must be a function type (not lambda or functor).
SpmdArgsThe original SPMD arguments passed to the invoke_simd.

Definition at line 43 of file invoke_simd.hpp.

◆ __builtin_invoke_simd() [2/2]

template<bool IsFunc, class SpmdRet , class SimdCallee , class... SpmdArgs, class = std::enable_if_t<IsFunc>>
SYCL_EXTERNAL __regcall SpmdRet __builtin_invoke_simd ( SimdCallee  target,
SpmdArgs...  args 
)

Definition at line 56 of file invoke_simd.hpp.