DPC++ Runtime
Runtime libraries for oneAPI DPC++
builtins.hpp File Reference
#include <CL/__spirv/spirv_ops.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/generic_type_traits.hpp>
#include <type_traits>
Include dependency graph for builtins.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 __host_std
 

Macros

#define __NOEXC   /*noexcept*/
 
#define __FUNC_PREFIX_OCL   sycl_host_
 
#define __FUNC_PREFIX_CORE   sycl_host_
 
#define __SYCL_EXTERN_IT1(Ret, prefix, call, Arg)    extern Ret __SYCL_PPCAT(prefix, call)(Arg)
 
#define __SYCL_EXTERN_IT2_SAME(Ret, prefix, call, Arg)    extern Ret __SYCL_PPCAT(prefix, call)(Arg, Arg)
 
#define __SYCL_EXTERN_IT2(Ret, prefix, call, Arg1, Arg2)    extern Ret __SYCL_PPCAT(prefix, call)(Arg1, Arg2)
 
#define __SYCL_EXTERN_IT3(Ret, prefix, call, Arg1, Arg2, Arg3)    extern Ret __SYCL_PPCAT(prefix, call)(Arg1, Arg2, Arg3)
 
#define __SYCL_PPCAT_NX(A, B)   A##B
 
#define __SYCL_PPCAT(A, B)   __SYCL_PPCAT_NX(A, B)
 
#define __SYCL_MAKE_CALL_ARG1(call, prefix)
 
#define __SYCL_MAKE_CALL_ARG2(call, prefix)
 
#define __SYCL_MAKE_CALL_ARG2_SAME(call, prefix)
 
#define __SYCL_MAKE_CALL_ARG2_SAME_RESULT(call, prefix)
 
#define __SYCL_MAKE_CALL_ARG3(call, prefix)
 

Functions

 __host_std::__SYCL_MAKE_CALL_ARG2_SAME (Dot, __FUNC_PREFIX_CORE) __SYCL_MAKE_CALL_ARG2_SAME_RESULT(FMul
 
__FUNC_PREFIX_CORE __host_std::__SYCL_MAKE_CALL_ARG2_SAME (FOrdEqual, __FUNC_PREFIX_CORE) __SYCL_MAKE_CALL_ARG2_SAME(FUnordNotEqual
 
__FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __host_std::__SYCL_MAKE_CALL_ARG2_SAME (FOrdGreaterThan, __FUNC_PREFIX_CORE) __SYCL_MAKE_CALL_ARG2_SAME(FOrdGreaterThanEqual
 
__FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __host_std::__SYCL_MAKE_CALL_ARG2_SAME (FOrdLessThan, __FUNC_PREFIX_CORE) __SYCL_MAKE_CALL_ARG2_SAME(FOrdLessThanEqual
 
__FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __host_std::__SYCL_MAKE_CALL_ARG2_SAME (FOrdNotEqual, __FUNC_PREFIX_CORE) __SYCL_MAKE_CALL_ARG2_SAME(LessOrGreater
 
__FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __host_std::__SYCL_MAKE_CALL_ARG1 (IsFinite, __FUNC_PREFIX_CORE) __SYCL_MAKE_CALL_ARG1(IsInf
 
__FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __host_std::__SYCL_MAKE_CALL_ARG1 (IsNan, __FUNC_PREFIX_CORE) __SYCL_MAKE_CALL_ARG1(IsNormal
 
__FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __host_std::__SYCL_MAKE_CALL_ARG2_SAME (Ordered, __FUNC_PREFIX_CORE) __SYCL_MAKE_CALL_ARG2_SAME(Unordered
 
__FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __host_std::__SYCL_MAKE_CALL_ARG1 (SignBitSet, __FUNC_PREFIX_CORE) __SYCL_MAKE_CALL_ARG1(Any
 
__FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __FUNC_PREFIX_CORE __host_std::__SYCL_MAKE_CALL_ARG1 (All, __FUNC_PREFIX_CORE) __SYCL_MAKE_CALL_ARG3(select
 

Macro Definition Documentation

◆ __FUNC_PREFIX_CORE

#define __FUNC_PREFIX_CORE   sycl_host_

Definition at line 29 of file builtins.hpp.

◆ __FUNC_PREFIX_OCL

#define __FUNC_PREFIX_OCL   sycl_host_

Definition at line 28 of file builtins.hpp.

◆ __NOEXC

#define __NOEXC   /*noexcept*/

Definition at line 18 of file builtins.hpp.

◆ __SYCL_EXTERN_IT1

#define __SYCL_EXTERN_IT1 (   Ret,
  prefix,
  call,
  Arg 
)     extern Ret __SYCL_PPCAT(prefix, call)(Arg)

Definition at line 30 of file builtins.hpp.

◆ __SYCL_EXTERN_IT2

#define __SYCL_EXTERN_IT2 (   Ret,
  prefix,
  call,
  Arg1,
  Arg2 
)     extern Ret __SYCL_PPCAT(prefix, call)(Arg1, Arg2)

Definition at line 34 of file builtins.hpp.

◆ __SYCL_EXTERN_IT2_SAME

#define __SYCL_EXTERN_IT2_SAME (   Ret,
  prefix,
  call,
  Arg 
)     extern Ret __SYCL_PPCAT(prefix, call)(Arg, Arg)

Definition at line 32 of file builtins.hpp.

◆ __SYCL_EXTERN_IT3

#define __SYCL_EXTERN_IT3 (   Ret,
  prefix,
  call,
  Arg1,
  Arg2,
  Arg3 
)     extern Ret __SYCL_PPCAT(prefix, call)(Arg1, Arg2, Arg3)

Definition at line 36 of file builtins.hpp.

◆ __SYCL_MAKE_CALL_ARG1

#define __SYCL_MAKE_CALL_ARG1 (   call,
  prefix 
)
Value:
template <typename R, typename T1> \
inline __SYCL_ALWAYS_INLINE R __invoke_##call(T1 t1) __NOEXC { \
using Ret = sycl::detail::ConvertToOpenCLType_t<R>; \
using Arg1 = sycl::detail::ConvertToOpenCLType_t<T1>; \
__SYCL_EXTERN_IT1(Ret, prefix, call, Arg1); \
Arg1 arg1 = sycl::detail::convertDataToType<T1, Arg1>(t1); \
Ret ret = __SYCL_PPCAT(prefix, call)(arg1); \
return sycl::detail::convertDataToType<Ret, R>(ret); \
}
#define __NOEXC
Definition: builtins.hpp:18
#define __SYCL_PPCAT(A, B)
Definition: builtins.hpp:41
#define __SYCL_ALWAYS_INLINE

Definition at line 43 of file builtins.hpp.

◆ __SYCL_MAKE_CALL_ARG2

#define __SYCL_MAKE_CALL_ARG2 (   call,
  prefix 
)
Value:
template <typename R, typename T1, typename T2> \
inline __SYCL_ALWAYS_INLINE R __invoke_##call(T1 t1, T2 t2) __NOEXC { \
using Ret = sycl::detail::ConvertToOpenCLType_t<R>; \
using Arg1 = sycl::detail::ConvertToOpenCLType_t<T1>; \
using Arg2 = sycl::detail::ConvertToOpenCLType_t<T2>; \
__SYCL_EXTERN_IT2(Ret, prefix, call, Arg1, Arg2); \
Arg1 arg1 = sycl::detail::convertDataToType<T1, Arg1>(t1); \
Arg2 arg2 = sycl::detail::convertDataToType<T2, Arg2>(t2); \
Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \
return sycl::detail::convertDataToType<Ret, R>(ret); \
}

Definition at line 54 of file builtins.hpp.

◆ __SYCL_MAKE_CALL_ARG2_SAME

#define __SYCL_MAKE_CALL_ARG2_SAME (   call,
  prefix 
)
Value:
template <typename R, typename T> \
inline __SYCL_ALWAYS_INLINE R __invoke_##call(T t1, T t2) __NOEXC { \
using Ret = sycl::detail::ConvertToOpenCLType_t<R>; \
using Arg = sycl::detail::ConvertToOpenCLType_t<T>; \
__SYCL_EXTERN_IT2_SAME(Ret, prefix, call, Arg); \
Arg arg1 = sycl::detail::convertDataToType<T, Arg>(t1); \
Arg arg2 = sycl::detail::convertDataToType<T, Arg>(t2); \
Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \
return sycl::detail::convertDataToType<Ret, R>(ret); \
}

Definition at line 67 of file builtins.hpp.

◆ __SYCL_MAKE_CALL_ARG2_SAME_RESULT

#define __SYCL_MAKE_CALL_ARG2_SAME_RESULT (   call,
  prefix 
)
Value:
template <typename T> \
inline __SYCL_ALWAYS_INLINE T __invoke_##call(T v1, T v2) __NOEXC { \
using Type = sycl::detail::ConvertToOpenCLType_t<T>; \
__SYCL_EXTERN_IT2_SAME(Type, prefix, call, Type); \
Type arg1 = sycl::detail::convertDataToType<T, Type>(v1); \
Type arg2 = sycl::detail::convertDataToType<T, Type>(v2); \
Type ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \
return sycl::detail::convertDataToType<Type, T>(ret); \
}

Definition at line 79 of file builtins.hpp.

◆ __SYCL_MAKE_CALL_ARG3

#define __SYCL_MAKE_CALL_ARG3 (   call,
  prefix 
)
Value:
template <typename R, typename T1, typename T2, typename T3> \
inline __SYCL_ALWAYS_INLINE R __invoke_##call(T1 t1, T2 t2, T3 t3) __NOEXC { \
using Ret = sycl::detail::ConvertToOpenCLType_t<R>; \
using Arg1 = sycl::detail::ConvertToOpenCLType_t<T1>; \
using Arg2 = sycl::detail::ConvertToOpenCLType_t<T2>; \
using Arg3 = sycl::detail::ConvertToOpenCLType_t<T3>; \
__SYCL_EXTERN_IT3(Ret, prefix, call, Arg1, Arg2, Arg3); \
Arg1 arg1 = sycl::detail::convertDataToType<T1, Arg1>(t1); \
Arg2 arg2 = sycl::detail::convertDataToType<T2, Arg2>(t2); \
Arg3 arg3 = sycl::detail::convertDataToType<T3, Arg3>(t3); \
Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2, arg3); \
return sycl::detail::convertDataToType<Ret, R>(ret); \
}

Definition at line 90 of file builtins.hpp.

◆ __SYCL_PPCAT

#define __SYCL_PPCAT (   A,
 
)    __SYCL_PPCAT_NX(A, B)

Definition at line 41 of file builtins.hpp.

◆ __SYCL_PPCAT_NX

#define __SYCL_PPCAT_NX (   A,
 
)    A##B

Definition at line 40 of file builtins.hpp.