Blender  V3.3
Macros | Functions
kernel_templates.h File Reference

Go to the source code of this file.

Macros

#define ONEAPI_TYP(x)   typename T##x
 
#define ONEAPI_CAST(x)   *(T##x *)(args[x])
 
#define ONEAPI_T(x)   T##x
 
#define ONEAPI_GET_NTH_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, N, ...)   N
 
#define ONEAPI_0(_call, ...)
 
#define ONEAPI_1(_call, x)   _call(x)
 
#define ONEAPI_2(_call, x, ...)   _call(x), ONEAPI_1(_call, __VA_ARGS__)
 
#define ONEAPI_3(_call, x, ...)   _call(x), ONEAPI_2(_call, __VA_ARGS__)
 
#define ONEAPI_4(_call, x, ...)   _call(x), ONEAPI_3(_call, __VA_ARGS__)
 
#define ONEAPI_5(_call, x, ...)   _call(x), ONEAPI_4(_call, __VA_ARGS__)
 
#define ONEAPI_6(_call, x, ...)   _call(x), ONEAPI_5(_call, __VA_ARGS__)
 
#define ONEAPI_7(_call, x, ...)   _call(x), ONEAPI_6(_call, __VA_ARGS__)
 
#define ONEAPI_8(_call, x, ...)   _call(x), ONEAPI_7(_call, __VA_ARGS__)
 
#define ONEAPI_9(_call, x, ...)   _call(x), ONEAPI_8(_call, __VA_ARGS__)
 
#define ONEAPI_10(_call, x, ...)   _call(x), ONEAPI_9(_call, __VA_ARGS__)
 
#define ONEAPI_11(_call, x, ...)   _call(x), ONEAPI_10(_call, __VA_ARGS__)
 
#define ONEAPI_12(_call, x, ...)   _call(x), ONEAPI_11(_call, __VA_ARGS__)
 
#define ONEAPI_13(_call, x, ...)   _call(x), ONEAPI_12(_call, __VA_ARGS__)
 
#define ONEAPI_14(_call, x, ...)   _call(x), ONEAPI_13(_call, __VA_ARGS__)
 
#define ONEAPI_15(_call, x, ...)   _call(x), ONEAPI_14(_call, __VA_ARGS__)
 
#define ONEAPI_16(_call, x, ...)   _call(x), ONEAPI_15(_call, __VA_ARGS__)
 
#define ONEAPI_17(_call, x, ...)   _call(x), ONEAPI_16(_call, __VA_ARGS__)
 
#define ONEAPI_18(_call, x, ...)   _call(x), ONEAPI_17(_call, __VA_ARGS__)
 
#define ONEAPI_19(_call, x, ...)   _call(x), ONEAPI_18(_call, __VA_ARGS__)
 
#define ONEAPI_20(_call, x, ...)   _call(x), ONEAPI_19(_call, __VA_ARGS__)
 
#define ONEAPI_21(_call, x, ...)   _call(x), ONEAPI_20(_call, __VA_ARGS__)
 
#define ONEAPI_CALL_FOR(x, ...)
 
#define oneapi_template(...)
 

Functions

 oneapi_template (0) oneapi_template(0
 
 oneapi_template (0, 1, 2) oneapi_template(0
 
 oneapi_template (0, 1, 2, 3, 4) oneapi_template(0
 
 oneapi_template (0, 1, 2, 3, 4, 5, 6) oneapi_template(0
 
 oneapi_template (0, 1, 2, 3, 4, 5, 6, 7, 8) oneapi_template(0
 
 oneapi_template (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) oneapi_template(0
 
 oneapi_template (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) oneapi_template(0
 
 oneapi_template (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14) oneapi_template(0
 
 oneapi_template (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) oneapi_template(0
 
 oneapi_template (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18) oneapi_template(0
 

Macro Definition Documentation

◆ ONEAPI_0

#define ONEAPI_0 (   _call,
  ... 
)

Definition at line 32 of file kernel_templates.h.

◆ ONEAPI_1

#define ONEAPI_1 (   _call,
  x 
)    _call(x)

Definition at line 33 of file kernel_templates.h.

◆ ONEAPI_10

#define ONEAPI_10 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_9(_call, __VA_ARGS__)

Definition at line 42 of file kernel_templates.h.

◆ ONEAPI_11

#define ONEAPI_11 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_10(_call, __VA_ARGS__)

Definition at line 43 of file kernel_templates.h.

◆ ONEAPI_12

#define ONEAPI_12 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_11(_call, __VA_ARGS__)

Definition at line 44 of file kernel_templates.h.

◆ ONEAPI_13

#define ONEAPI_13 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_12(_call, __VA_ARGS__)

Definition at line 45 of file kernel_templates.h.

◆ ONEAPI_14

#define ONEAPI_14 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_13(_call, __VA_ARGS__)

Definition at line 46 of file kernel_templates.h.

◆ ONEAPI_15

#define ONEAPI_15 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_14(_call, __VA_ARGS__)

Definition at line 47 of file kernel_templates.h.

◆ ONEAPI_16

#define ONEAPI_16 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_15(_call, __VA_ARGS__)

Definition at line 48 of file kernel_templates.h.

◆ ONEAPI_17

#define ONEAPI_17 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_16(_call, __VA_ARGS__)

Definition at line 49 of file kernel_templates.h.

◆ ONEAPI_18

#define ONEAPI_18 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_17(_call, __VA_ARGS__)

Definition at line 50 of file kernel_templates.h.

◆ ONEAPI_19

#define ONEAPI_19 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_18(_call, __VA_ARGS__)

Definition at line 51 of file kernel_templates.h.

◆ ONEAPI_2

#define ONEAPI_2 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_1(_call, __VA_ARGS__)

Definition at line 34 of file kernel_templates.h.

◆ ONEAPI_20

#define ONEAPI_20 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_19(_call, __VA_ARGS__)

Definition at line 52 of file kernel_templates.h.

◆ ONEAPI_21

#define ONEAPI_21 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_20(_call, __VA_ARGS__)

Definition at line 53 of file kernel_templates.h.

◆ ONEAPI_3

#define ONEAPI_3 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_2(_call, __VA_ARGS__)

Definition at line 35 of file kernel_templates.h.

◆ ONEAPI_4

#define ONEAPI_4 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_3(_call, __VA_ARGS__)

Definition at line 36 of file kernel_templates.h.

◆ ONEAPI_5

#define ONEAPI_5 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_4(_call, __VA_ARGS__)

Definition at line 37 of file kernel_templates.h.

◆ ONEAPI_6

#define ONEAPI_6 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_5(_call, __VA_ARGS__)

Definition at line 38 of file kernel_templates.h.

◆ ONEAPI_7

#define ONEAPI_7 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_6(_call, __VA_ARGS__)

Definition at line 39 of file kernel_templates.h.

◆ ONEAPI_8

#define ONEAPI_8 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_7(_call, __VA_ARGS__)

Definition at line 40 of file kernel_templates.h.

◆ ONEAPI_9

#define ONEAPI_9 (   _call,
  x,
  ... 
)    _call(x), ONEAPI_8(_call, __VA_ARGS__)

Definition at line 41 of file kernel_templates.h.

◆ ONEAPI_CALL_FOR

#define ONEAPI_CALL_FOR (   x,
  ... 
)
Value:
ONEAPI_GET_NTH_ARG("ignored", \
##__VA_ARGS__, \
(x, ##__VA_ARGS__)
#define ONEAPI_21(_call, x,...)
#define ONEAPI_6(_call, x,...)
#define ONEAPI_7(_call, x,...)
#define ONEAPI_3(_call, x,...)
#define ONEAPI_13(_call, x,...)
#define ONEAPI_9(_call, x,...)
#define ONEAPI_10(_call, x,...)
#define ONEAPI_17(_call, x,...)
#define ONEAPI_16(_call, x,...)
#define ONEAPI_8(_call, x,...)
#define ONEAPI_1(_call, x)
#define ONEAPI_2(_call, x,...)
#define ONEAPI_11(_call, x,...)
#define ONEAPI_5(_call, x,...)
#define ONEAPI_4(_call, x,...)
#define ONEAPI_15(_call, x,...)
#define ONEAPI_20(_call, x,...)
#define ONEAPI_19(_call, x,...)
#define ONEAPI_GET_NTH_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, N, ...)
#define ONEAPI_14(_call, x,...)
#define ONEAPI_18(_call, x,...)
#define ONEAPI_12(_call, x,...)
#define ONEAPI_0(_call,...)

Definition at line 55 of file kernel_templates.h.

◆ ONEAPI_CAST

#define ONEAPI_CAST (   x)    *(T##x *)(args[x])

Definition at line 28 of file kernel_templates.h.

◆ ONEAPI_GET_NTH_ARG

#define ONEAPI_GET_NTH_ARG (   _1,
  _2,
  _3,
  _4,
  _5,
  _6,
  _7,
  _8,
  _9,
  _10,
  _11,
  _12,
  _13,
  _14,
  _15,
  _16,
  _17,
  _18,
  _19,
  _20,
  _21,
  _22,
  N,
  ... 
)    N

Definition at line 31 of file kernel_templates.h.

◆ ONEAPI_T

#define ONEAPI_T (   x)    T##x

Definition at line 29 of file kernel_templates.h.

◆ oneapi_template

#define oneapi_template (   ...)
Value:
template<ONEAPI_CALL_FOR(ONEAPI_TYP, __VA_ARGS__)> \
void oneapi_call( \
sycl::handler &cgh, \
size_t global_size, \
size_t local_size, \
void **args, \
void (*func)(KernelGlobalsGPU*, size_t, size_t, sycl::handler &, ONEAPI_CALL_FOR(ONEAPI_T, __VA_ARGS__))) \
{ \
func(kg, \
local_size, \
cgh, \
ONEAPI_CALL_FOR(ONEAPI_CAST, __VA_ARGS__)); \
}
SyclQueue void void size_t num_bytes SyclQueue void const char void *memory_device_pointer KernelContext int size_t global_size
#define ONEAPI_CALL_FOR(x,...)
#define ONEAPI_CAST(x)
#define ONEAPI_T(x)

Definition at line 84 of file kernel_templates.h.

◆ ONEAPI_TYP

#define ONEAPI_TYP (   x)    typename T##x

Definition at line 27 of file kernel_templates.h.

Function Documentation

◆ oneapi_template() [1/10]

oneapi_template ( )

◆ oneapi_template() [2/10]

oneapi_template ( ,
,
 
)

◆ oneapi_template() [3/10]

oneapi_template ( ,
,
,
,
 
)

◆ oneapi_template() [4/10]

oneapi_template ( ,
,
,
,
,
,
 
)

◆ oneapi_template() [5/10]

oneapi_template ( ,
,
,
,
,
,
,
,
 
)

◆ oneapi_template() [6/10]

oneapi_template ( ,
,
,
,
,
,
,
,
,
,
10   
)

◆ oneapi_template() [7/10]

oneapi_template ( ,
,
,
,
,
,
,
,
,
,
10  ,
11  ,
12   
)

◆ oneapi_template() [8/10]

oneapi_template ( ,
,
,
,
,
,
,
,
,
,
10  ,
11  ,
12  ,
13  ,
14   
)

◆ oneapi_template() [9/10]

oneapi_template ( ,
,
,
,
,
,
,
,
,
,
10  ,
11  ,
12  ,
13  ,
14  ,
15  ,
16   
)

◆ oneapi_template() [10/10]

oneapi_template ( ,
,
,
,
,
,
,
,
,
,
10  ,
11  ,
12  ,
13  ,
14  ,
15  ,
16  ,
17  ,
18   
)