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

Go to the source code of this file.

Classes

struct  cl::__host_std::detail::helper< N >
 
struct  cl::__host_std::detail::helper< 0 >
 

Namespaces

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

Macros

#define __NOEXC   /*noexcept*/
 
#define __MAKE_1V(Fun, Call, N, Ret, Arg1)
 
#define __MAKE_1V_2V(Fun, Call, N, Ret, Arg1, Arg2)
 
#define __MAKE_1V_2V_RS(Fun, Call, N, Ret, Arg1, Arg2)
 
#define __MAKE_1V_RS(Fun, Call, N, Ret, Arg1)
 
#define __MAKE_1V_2V_3V(Fun, Call, N, Ret, Arg1, Arg2, Arg3)
 
#define __MAKE_1V_2S_3S(Fun, N, Ret, Arg1, Arg2, Arg3)
 
#define __MAKE_1V_2S(Fun, N, Ret, Arg1, Arg2)
 
#define __MAKE_SR_1V_AND(Fun, Call, N, Ret, Arg1)
 
#define __MAKE_SR_1V_OR(Fun, Call, N, Ret, Arg1)
 
#define __MAKE_1V_2P(Fun, N, Ret, Arg1, Arg2)
 
#define __MAKE_1V_2V_3P(Fun, N, Ret, Arg1, Arg2, Arg3)
 
#define MAKE_1V(Fun, Ret, Arg1)   MAKE_1V_FUNC(Fun, Fun, Ret, Arg1)
 
#define MAKE_1V_FUNC(Fun, Call, Ret, Arg1)
 
#define MAKE_1V_2V(Fun, Ret, Arg1, Arg2)   MAKE_1V_2V_FUNC(Fun, Fun, Ret, Arg1, Arg2)
 
#define MAKE_1V_2V_FUNC(Fun, Call, Ret, Arg1, Arg2)
 
#define MAKE_1V_2V_3V(Fun, Ret, Arg1, Arg2, Arg3)   MAKE_1V_2V_3V_FUNC(Fun, Fun, Ret, Arg1, Arg2, Arg3)
 
#define MAKE_1V_2V_3V_FUNC(Fun, Call, Ret, Arg1, Arg2, Arg3)
 
#define MAKE_SC_1V_2V_3V(Fun, Ret, Arg1, Arg2, Arg3)
 
#define MAKE_SC_FSC_1V_2V_3V_FV(FunSc, FunV, Ret, Arg1, Arg2, Arg3)
 
#define MAKE_SC_3ARG(Fun, Ret, Arg1, Arg2, Arg3)
 
#define MAKE_1V_2S(Fun, Ret, Arg1, Arg2)
 
#define MAKE_1V_2S_3S(Fun, Ret, Arg1, Arg2, Arg3)
 
#define MAKE_SR_1V_AND(Fun, Call, Ret, Arg1)
 
#define MAKE_SR_1V_OR(Fun, Call, Ret, Arg1)
 
#define MAKE_1V_2P(Fun, Ret, Arg1, Arg2)
 
#define MAKE_GEO_1V_2V_RS(Fun, Call, Ret, Arg1, Arg2)
 
#define MAKE_1V_2V_3P(Fun, Ret, Arg1, Arg2, Arg3)
 

Macro Definition Documentation

◆ __MAKE_1V

#define __MAKE_1V (   Fun,
  Call,
  N,
  Ret,
  Arg1 
)
Value:
__SYCL_EXPORT sycl::vec<Ret, N> Fun __NOEXC(sycl::vec<Arg1, N> x) { \
sycl::vec<Ret, N> r; \
detail::helper<N - 1>().run_1v( \
r, [](Arg1 x) { return cl::__host_std::Call(x); }, x); \
return r; \
}

Definition at line 18 of file builtins_helper.hpp.

◆ __MAKE_1V_2P

#define __MAKE_1V_2P (   Fun,
  N,
  Ret,
  Arg1,
  Arg2 
)
Value:
__SYCL_EXPORT sycl::vec<Ret, N> Fun __NOEXC(sycl::vec<Arg1, N> x, \
sycl::vec<Arg2, N> *y) { \
sycl::vec<Ret, N> r; \
detail::helper<N - 1>().run_1v_2p( \
r, [](Arg1 x, Arg2 *y) { return cl::__host_std::Fun(x, y); }, x, y); \
return r; \
}

Definition at line 99 of file builtins_helper.hpp.

◆ __MAKE_1V_2S

#define __MAKE_1V_2S (   Fun,
  N,
  Ret,
  Arg1,
  Arg2 
)
Value:
__SYCL_EXPORT sycl::vec<Ret, N> Fun __NOEXC(sycl::vec<Arg1, N> x, Arg2 y) { \
sycl::vec<Ret, N> r; \
detail::helper<N - 1>().run_1v_2s( \
r, [](Arg1 x, Arg2 y) { return cl::__host_std::Fun(x, y); }, x, y); \
return r; \
}

Definition at line 75 of file builtins_helper.hpp.

◆ __MAKE_1V_2S_3S

#define __MAKE_1V_2S_3S (   Fun,
  N,
  Ret,
  Arg1,
  Arg2,
  Arg3 
)
Value:
__SYCL_EXPORT sycl::vec<Ret, N> Fun __NOEXC(sycl::vec<Arg1, N> x, Arg2 y, \
Arg3 z) { \
sycl::vec<Ret, N> r; \
detail::helper<N - 1>().run_1v_2s_3s( \
r, \
[](Arg1 x, Arg2 y, Arg3 z) { return cl::__host_std::Fun(x, y, z); }, \
x, y, z); \
return r; \
}

Definition at line 64 of file builtins_helper.hpp.

◆ __MAKE_1V_2V

#define __MAKE_1V_2V (   Fun,
  Call,
  N,
  Ret,
  Arg1,
  Arg2 
)
Value:
__SYCL_EXPORT sycl::vec<Ret, N> Fun __NOEXC(sycl::vec<Arg1, N> x, \
sycl::vec<Arg2, N> y) { \
sycl::vec<Ret, N> r; \
detail::helper<N - 1>().run_1v_2v( \
r, [](Arg1 x, Arg2 y) { return cl::__host_std::Call(x, y); }, x, y); \
return r; \
}

Definition at line 26 of file builtins_helper.hpp.

◆ __MAKE_1V_2V_3P

#define __MAKE_1V_2V_3P (   Fun,
  N,
  Ret,
  Arg1,
  Arg2,
  Arg3 
)
Value:
__SYCL_EXPORT sycl::vec<Ret, N> Fun __NOEXC( \
sycl::vec<Arg1, N> x, sycl::vec<Arg2, N> y, sycl::vec<Arg3, N> *z) { \
sycl::vec<Ret, N> r; \
detail::helper<N - 1>().run_1v_2v_3p( \
r, \
[](Arg1 x, Arg2 y, Arg3 *z) { return cl::__host_std::Fun(x, y, z); }, \
x, y, z); \
return r; \
}

Definition at line 108 of file builtins_helper.hpp.

◆ __MAKE_1V_2V_3V

#define __MAKE_1V_2V_3V (   Fun,
  Call,
  N,
  Ret,
  Arg1,
  Arg2,
  Arg3 
)
Value:
__SYCL_EXPORT sycl::vec<Ret, N> Fun __NOEXC( \
sycl::vec<Arg1, N> x, sycl::vec<Arg2, N> y, sycl::vec<Arg3, N> z) { \
sycl::vec<Ret, N> r; \
detail::helper<N - 1>().run_1v_2v_3v( \
r, \
[](Arg1 x, Arg2 y, Arg3 z) { return cl::__host_std::Call(x, y, z); }, \
x, y, z); \
return r; \
}

Definition at line 53 of file builtins_helper.hpp.

◆ __MAKE_1V_2V_RS

#define __MAKE_1V_2V_RS (   Fun,
  Call,
  N,
  Ret,
  Arg1,
  Arg2 
)
Value:
__SYCL_EXPORT Ret Fun __NOEXC(sycl::vec<Arg1, N> x, sycl::vec<Arg2, N> y) { \
Ret r = Ret(); \
detail::helper<N - 1>().run_1v_2v_rs( \
r, \
[](Ret &r, Arg1 x, Arg2 y) { return cl::__host_std::Call(r, x, y); }, \
x, y); \
return r; \
}

Definition at line 35 of file builtins_helper.hpp.

◆ __MAKE_1V_RS

#define __MAKE_1V_RS (   Fun,
  Call,
  N,
  Ret,
  Arg1 
)
Value:
__SYCL_EXPORT Ret Fun __NOEXC(sycl::vec<Arg1, N> x) { \
Ret r = Ret(); \
detail::helper<N - 1>().run_1v_rs( \
r, [](Ret &r, Arg1 x) { return cl::__host_std::Call(r, x); }, x); \
return r; \
}

Definition at line 45 of file builtins_helper.hpp.

◆ __MAKE_SR_1V_AND

#define __MAKE_SR_1V_AND (   Fun,
  Call,
  N,
  Ret,
  Arg1 
)
Value:
__SYCL_EXPORT Ret Fun __NOEXC(sycl::vec<Arg1, N> x) { \
Ret r; \
detail::helper<N - 1>().run_1v_sr_and( \
r, [](Arg1 x) { return cl::__host_std::Call(x); }, x); \
return r; \
}

Definition at line 83 of file builtins_helper.hpp.

◆ __MAKE_SR_1V_OR

#define __MAKE_SR_1V_OR (   Fun,
  Call,
  N,
  Ret,
  Arg1 
)
Value:
__SYCL_EXPORT Ret Fun __NOEXC(sycl::vec<Arg1, N> x) { \
Ret r; \
detail::helper<N - 1>().run_1v_sr_or( \
r, [](Arg1 x) { return cl::__host_std::Call(x); }, x); \
return r; \
}

Definition at line 91 of file builtins_helper.hpp.

◆ __NOEXC

#define __NOEXC   /*noexcept*/

Definition at line 16 of file builtins_helper.hpp.

◆ MAKE_1V

#define MAKE_1V (   Fun,
  Ret,
  Arg1 
)    MAKE_1V_FUNC(Fun, Fun, Ret, Arg1)

Definition at line 119 of file builtins_helper.hpp.

◆ MAKE_1V_2P

#define MAKE_1V_2P (   Fun,
  Ret,
  Arg1,
  Arg2 
)
Value:
__MAKE_1V_2P(Fun, 1, Ret, Arg1, Arg2) \
__MAKE_1V_2P(Fun, 2, Ret, Arg1, Arg2) \
__MAKE_1V_2P(Fun, 3, Ret, Arg1, Arg2) \
__MAKE_1V_2P(Fun, 4, Ret, Arg1, Arg2) \
__MAKE_1V_2P(Fun, 8, Ret, Arg1, Arg2) \
__MAKE_1V_2P(Fun, 16, Ret, Arg1, Arg2)

Definition at line 196 of file builtins_helper.hpp.

◆ MAKE_1V_2S

#define MAKE_1V_2S (   Fun,
  Ret,
  Arg1,
  Arg2 
)
Value:
__MAKE_1V_2S(Fun, 1, Ret, Arg1, Arg2) \
__MAKE_1V_2S(Fun, 2, Ret, Arg1, Arg2) \
__MAKE_1V_2S(Fun, 3, Ret, Arg1, Arg2) \
__MAKE_1V_2S(Fun, 4, Ret, Arg1, Arg2) \
__MAKE_1V_2S(Fun, 8, Ret, Arg1, Arg2) \
__MAKE_1V_2S(Fun, 16, Ret, Arg1, Arg2)

Definition at line 164 of file builtins_helper.hpp.

◆ MAKE_1V_2S_3S

#define MAKE_1V_2S_3S (   Fun,
  Ret,
  Arg1,
  Arg2,
  Arg3 
)
Value:
__MAKE_1V_2S_3S(Fun, 1, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2S_3S(Fun, 2, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2S_3S(Fun, 3, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2S_3S(Fun, 4, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2S_3S(Fun, 8, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2S_3S(Fun, 16, Ret, Arg1, Arg2, Arg3)

Definition at line 172 of file builtins_helper.hpp.

◆ MAKE_1V_2V

#define MAKE_1V_2V (   Fun,
  Ret,
  Arg1,
  Arg2 
)    MAKE_1V_2V_FUNC(Fun, Fun, Ret, Arg1, Arg2)

Definition at line 129 of file builtins_helper.hpp.

◆ MAKE_1V_2V_3P

#define MAKE_1V_2V_3P (   Fun,
  Ret,
  Arg1,
  Arg2,
  Arg3 
)
Value:
__MAKE_1V_2V_3P(Fun, 1, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2V_3P(Fun, 2, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2V_3P(Fun, 3, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2V_3P(Fun, 4, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2V_3P(Fun, 8, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2V_3P(Fun, 16, Ret, Arg1, Arg2, Arg3)

Definition at line 212 of file builtins_helper.hpp.

◆ MAKE_1V_2V_3V

#define MAKE_1V_2V_3V (   Fun,
  Ret,
  Arg1,
  Arg2,
  Arg3 
)    MAKE_1V_2V_3V_FUNC(Fun, Fun, Ret, Arg1, Arg2, Arg3)

Definition at line 140 of file builtins_helper.hpp.

◆ MAKE_1V_2V_3V_FUNC

#define MAKE_1V_2V_3V_FUNC (   Fun,
  Call,
  Ret,
  Arg1,
  Arg2,
  Arg3 
)
Value:
__MAKE_1V_2V_3V(Fun, Call, 1, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2V_3V(Fun, Call, 2, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2V_3V(Fun, Call, 3, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2V_3V(Fun, Call, 4, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2V_3V(Fun, Call, 8, Ret, Arg1, Arg2, Arg3) \
__MAKE_1V_2V_3V(Fun, Call, 16, Ret, Arg1, Arg2, Arg3)

Definition at line 143 of file builtins_helper.hpp.

◆ MAKE_1V_2V_FUNC

#define MAKE_1V_2V_FUNC (   Fun,
  Call,
  Ret,
  Arg1,
  Arg2 
)
Value:
__MAKE_1V_2V(Fun, Call, 1, Ret, Arg1, Arg2) \
__MAKE_1V_2V(Fun, Call, 2, Ret, Arg1, Arg2) \
__MAKE_1V_2V(Fun, Call, 3, Ret, Arg1, Arg2) \
__MAKE_1V_2V(Fun, Call, 4, Ret, Arg1, Arg2) \
__MAKE_1V_2V(Fun, Call, 8, Ret, Arg1, Arg2) \
__MAKE_1V_2V(Fun, Call, 16, Ret, Arg1, Arg2)

Definition at line 132 of file builtins_helper.hpp.

◆ MAKE_1V_FUNC

#define MAKE_1V_FUNC (   Fun,
  Call,
  Ret,
  Arg1 
)
Value:
__MAKE_1V(Fun, Call, 1, Ret, Arg1) \
__MAKE_1V(Fun, Call, 2, Ret, Arg1) \
__MAKE_1V(Fun, Call, 3, Ret, Arg1) \
__MAKE_1V(Fun, Call, 4, Ret, Arg1) \
__MAKE_1V(Fun, Call, 8, Ret, Arg1) \
__MAKE_1V(Fun, Call, 16, Ret, Arg1)

Definition at line 121 of file builtins_helper.hpp.

◆ MAKE_GEO_1V_2V_RS

#define MAKE_GEO_1V_2V_RS (   Fun,
  Call,
  Ret,
  Arg1,
  Arg2 
)
Value:
__MAKE_1V_2V_RS(Fun, Call, 1, Ret, Arg1, Arg2) \
__MAKE_1V_2V_RS(Fun, Call, 2, Ret, Arg1, Arg2) \
__MAKE_1V_2V_RS(Fun, Call, 3, Ret, Arg1, Arg2) \
__MAKE_1V_2V_RS(Fun, Call, 4, Ret, Arg1, Arg2) \
__MAKE_1V_2V_RS(Fun, Call, 8, Ret, Arg1, Arg2) \
__MAKE_1V_2V_RS(Fun, Call, 16, Ret, Arg1, Arg2)

Definition at line 204 of file builtins_helper.hpp.

◆ MAKE_SC_1V_2V_3V

#define MAKE_SC_1V_2V_3V (   Fun,
  Ret,
  Arg1,
  Arg2,
  Arg3 
)
Value:
MAKE_SC_3ARG(Fun, Ret, Arg1, Arg2, Arg3) \
MAKE_1V_2V_3V_FUNC(Fun, Fun, Ret, Arg1, Arg2, Arg3)

Definition at line 151 of file builtins_helper.hpp.

◆ MAKE_SC_3ARG

#define MAKE_SC_3ARG (   Fun,
  Ret,
  Arg1,
  Arg2,
  Arg3 
)
Value:
__SYCL_EXPORT Ret Fun __NOEXC(Arg1 x, Arg2 y, Arg3 z) { \
return (Ret)__##Fun(x, y, z); \
}

Definition at line 159 of file builtins_helper.hpp.

◆ MAKE_SC_FSC_1V_2V_3V_FV

#define MAKE_SC_FSC_1V_2V_3V_FV (   FunSc,
  FunV,
  Ret,
  Arg1,
  Arg2,
  Arg3 
)
Value:
MAKE_SC_3ARG(FunSc, Ret, Arg1, Arg2, Arg3) \
MAKE_1V_2V_3V_FUNC(FunSc, FunV, Ret, Arg1, Arg2, Arg3)

Definition at line 155 of file builtins_helper.hpp.

◆ MAKE_SR_1V_AND

#define MAKE_SR_1V_AND (   Fun,
  Call,
  Ret,
  Arg1 
)
Value:
__MAKE_SR_1V_AND(Fun, Call, 1, Ret, Arg1) \
__MAKE_SR_1V_AND(Fun, Call, 2, Ret, Arg1) \
__MAKE_SR_1V_AND(Fun, Call, 3, Ret, Arg1) \
__MAKE_SR_1V_AND(Fun, Call, 4, Ret, Arg1) \
__MAKE_SR_1V_AND(Fun, Call, 8, Ret, Arg1) \
__MAKE_SR_1V_AND(Fun, Call, 16, Ret, Arg1)

Definition at line 180 of file builtins_helper.hpp.

◆ MAKE_SR_1V_OR

#define MAKE_SR_1V_OR (   Fun,
  Call,
  Ret,
  Arg1 
)
Value:
__MAKE_SR_1V_OR(Fun, Call, 1, Ret, Arg1) \
__MAKE_SR_1V_OR(Fun, Call, 2, Ret, Arg1) \
__MAKE_SR_1V_OR(Fun, Call, 3, Ret, Arg1) \
__MAKE_SR_1V_OR(Fun, Call, 4, Ret, Arg1) \
__MAKE_SR_1V_OR(Fun, Call, 8, Ret, Arg1) \
__MAKE_SR_1V_OR(Fun, Call, 16, Ret, Arg1)

Definition at line 188 of file builtins_helper.hpp.

__MAKE_1V_2V_3V
#define __MAKE_1V_2V_3V(Fun, Call, N, Ret, Arg1, Arg2, Arg3)
Definition: builtins_helper.hpp:53
__MAKE_1V_2S_3S
#define __MAKE_1V_2S_3S(Fun, N, Ret, Arg1, Arg2, Arg3)
Definition: builtins_helper.hpp:64
__MAKE_1V_2P
#define __MAKE_1V_2P(Fun, N, Ret, Arg1, Arg2)
Definition: builtins_helper.hpp:99
__MAKE_1V_2V
#define __MAKE_1V_2V(Fun, Call, N, Ret, Arg1, Arg2)
Definition: builtins_helper.hpp:26
__MAKE_SR_1V_AND
#define __MAKE_SR_1V_AND(Fun, Call, N, Ret, Arg1)
Definition: builtins_helper.hpp:83
__MAKE_1V
#define __MAKE_1V(Fun, Call, N, Ret, Arg1)
Definition: builtins_helper.hpp:18
cl::sycl::image_channel_order::r
@ r
__MAKE_1V_2S
#define __MAKE_1V_2S(Fun, N, Ret, Arg1, Arg2)
Definition: builtins_helper.hpp:75
__MAKE_1V_2V_3P
#define __MAKE_1V_2V_3P(Fun, N, Ret, Arg1, Arg2, Arg3)
Definition: builtins_helper.hpp:108
__NOEXC
#define __NOEXC
Definition: builtins_helper.hpp:16
MAKE_SC_3ARG
#define MAKE_SC_3ARG(Fun, Ret, Arg1, Arg2, Arg3)
Definition: builtins_helper.hpp:159
__MAKE_SR_1V_OR
#define __MAKE_SR_1V_OR(Fun, Call, N, Ret, Arg1)
Definition: builtins_helper.hpp:91
__MAKE_1V_2V_RS
#define __MAKE_1V_2V_RS(Fun, Call, N, Ret, Arg1, Arg2)
Definition: builtins_helper.hpp:35