Project
Loading...
Searching...
No Matches
GPUDefMacros.h File Reference

Go to the source code of this file.

Macros

#define GPUCA_M_EXPAND(x)   x
 
#define GPUCA_M_STRIP_A(...)   __VA_ARGS__
 
#define GPUCA_M_STRIP(X)   GPUCA_M_STRIP_A X
 
#define GPUCA_M_STR_X(a)   #a
 
#define GPUCA_M_STR(a)   GPUCA_M_STR_X(a)
 
#define GPUCA_M_CAT_A(a, b)   a ## b
 
#define GPUCA_M_CAT(...)   GPUCA_M_CAT_A(__VA_ARGS__)
 
#define GPUCA_M_CAT3_A(a, b, c)   a ## b ## c
 
#define GPUCA_M_CAT3(...)   GPUCA_M_CAT3_A(__VA_ARGS__)
 
#define GPUCA_M_FIRST_A(a, ...)   a
 
#define GPUCA_M_FIRST(...)   GPUCA_M_FIRST_A(__VA_ARGS__)
 
#define GPUCA_M_SHIFT_A(a, ...)   __VA_ARGS__
 
#define GPUCA_M_SHIFT(...)   GPUCA_M_SHIFT_A(__VA_ARGS__)
 
#define GPUCA_M_FIRST2_A(a, b, ...)   a, b
 
#define GPUCA_M_FIRST2(...)   GPUCA_M_FIRST2_A(__VA_ARGS__, 0)
 
#define GPUCA_M_STRIP_FIRST(a)   GPUCA_M_FIRST(GPUCA_M_STRIP(a))
 
#define GPUCA_M_COUNT_A(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, N, ...)   N
 
#define GPUCA_M_COUNT3_A(_1, _2, _3, N, ...)   N
 
#define GPUCA_M_COUNT(...)   GPUCA_M_COUNT_A(__VA_ARGS__, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
 
#define GPUCA_M_SINGLEOPT(...)   GPUCA_M_COUNT_A(__VA_ARGS__, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1)
 
#define GPUCA_M_MAX2_3(...)   GPUCA_M_COUNT3_A(__VA_ARGS__, GPUCA_M_FIRST2(__VA_ARGS__), GPUCA_M_FIRST2(__VA_ARGS__), GPUCA_M_FIRST(__VA_ARGS__), )
 
#define GPUCA_M_MAX1_3(...)   GPUCA_M_COUNT3_A(__VA_ARGS__, GPUCA_M_FIRST(__VA_ARGS__), GPUCA_M_FIRST(__VA_ARGS__), GPUCA_M_FIRST(__VA_ARGS__), )
 
#define GPUCA_M_UNROLL_
 
#define GPUCA_M_UNROLL_U(...)   _Pragma(GPUCA_M_STR(unroll __VA_ARGS__))
 
#define GPUCA_UNROLL(...)
 

Detailed Description

Author
David Rohr

Definition in file GPUDefMacros.h.

Macro Definition Documentation

◆ GPUCA_M_CAT

#define GPUCA_M_CAT (   ...)    GPUCA_M_CAT_A(__VA_ARGS__)

Definition at line 27 of file GPUDefMacros.h.

◆ GPUCA_M_CAT3

#define GPUCA_M_CAT3 (   ...)    GPUCA_M_CAT3_A(__VA_ARGS__)

Definition at line 29 of file GPUDefMacros.h.

◆ GPUCA_M_CAT3_A

#define GPUCA_M_CAT3_A (   a,
  b,
  c 
)    a ## b ## c

Definition at line 28 of file GPUDefMacros.h.

◆ GPUCA_M_CAT_A

#define GPUCA_M_CAT_A (   a,
  b 
)    a ## b

Definition at line 26 of file GPUDefMacros.h.

◆ GPUCA_M_COUNT

#define GPUCA_M_COUNT (   ...)    GPUCA_M_COUNT_A(__VA_ARGS__, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)

Definition at line 42 of file GPUDefMacros.h.

◆ GPUCA_M_COUNT3_A

#define GPUCA_M_COUNT3_A (   _1,
  _2,
  _3,
  N,
  ... 
)    N

Definition at line 41 of file GPUDefMacros.h.

◆ GPUCA_M_COUNT_A

#define GPUCA_M_COUNT_A (   _1,
  _2,
  _3,
  _4,
  _5,
  _6,
  _7,
  _8,
  _9,
  _10,
  _11,
  _12,
  _13,
  _14,
  _15,
  N,
  ... 
)    N

Definition at line 40 of file GPUDefMacros.h.

◆ GPUCA_M_EXPAND

#define GPUCA_M_EXPAND (   x)    x

Definition at line 19 of file GPUDefMacros.h.

◆ GPUCA_M_FIRST

#define GPUCA_M_FIRST (   ...)    GPUCA_M_FIRST_A(__VA_ARGS__)

Definition at line 32 of file GPUDefMacros.h.

◆ GPUCA_M_FIRST2

#define GPUCA_M_FIRST2 (   ...)    GPUCA_M_FIRST2_A(__VA_ARGS__, 0)

Definition at line 36 of file GPUDefMacros.h.

◆ GPUCA_M_FIRST2_A

#define GPUCA_M_FIRST2_A (   a,
  b,
  ... 
)    a, b

Definition at line 35 of file GPUDefMacros.h.

◆ GPUCA_M_FIRST_A

#define GPUCA_M_FIRST_A (   a,
  ... 
)    a

Definition at line 31 of file GPUDefMacros.h.

◆ GPUCA_M_MAX1_3

#define GPUCA_M_MAX1_3 (   ...)    GPUCA_M_COUNT3_A(__VA_ARGS__, GPUCA_M_FIRST(__VA_ARGS__), GPUCA_M_FIRST(__VA_ARGS__), GPUCA_M_FIRST(__VA_ARGS__), )

Definition at line 45 of file GPUDefMacros.h.

◆ GPUCA_M_MAX2_3

#define GPUCA_M_MAX2_3 (   ...)    GPUCA_M_COUNT3_A(__VA_ARGS__, GPUCA_M_FIRST2(__VA_ARGS__), GPUCA_M_FIRST2(__VA_ARGS__), GPUCA_M_FIRST(__VA_ARGS__), )

Definition at line 44 of file GPUDefMacros.h.

◆ GPUCA_M_SHIFT

#define GPUCA_M_SHIFT (   ...)    GPUCA_M_SHIFT_A(__VA_ARGS__)

Definition at line 34 of file GPUDefMacros.h.

◆ GPUCA_M_SHIFT_A

#define GPUCA_M_SHIFT_A (   a,
  ... 
)    __VA_ARGS__

Definition at line 33 of file GPUDefMacros.h.

◆ GPUCA_M_SINGLEOPT

#define GPUCA_M_SINGLEOPT (   ...)    GPUCA_M_COUNT_A(__VA_ARGS__, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1)

Definition at line 43 of file GPUDefMacros.h.

◆ GPUCA_M_STR

#define GPUCA_M_STR (   a)    GPUCA_M_STR_X(a)

Definition at line 24 of file GPUDefMacros.h.

◆ GPUCA_M_STR_X

#define GPUCA_M_STR_X (   a)    #a

Definition at line 23 of file GPUDefMacros.h.

◆ GPUCA_M_STRIP

#define GPUCA_M_STRIP (   X)    GPUCA_M_STRIP_A X

Definition at line 21 of file GPUDefMacros.h.

◆ GPUCA_M_STRIP_A

#define GPUCA_M_STRIP_A (   ...)    __VA_ARGS__

Definition at line 20 of file GPUDefMacros.h.

◆ GPUCA_M_STRIP_FIRST

#define GPUCA_M_STRIP_FIRST (   a)    GPUCA_M_FIRST(GPUCA_M_STRIP(a))

Definition at line 38 of file GPUDefMacros.h.

◆ GPUCA_M_UNROLL_

#define GPUCA_M_UNROLL_

Definition at line 47 of file GPUDefMacros.h.

◆ GPUCA_M_UNROLL_U

#define GPUCA_M_UNROLL_U (   ...)    _Pragma(GPUCA_M_STR(unroll __VA_ARGS__))

Definition at line 48 of file GPUDefMacros.h.

◆ GPUCA_UNROLL

#define GPUCA_UNROLL (   ...)

Definition at line 50 of file GPUDefMacros.h.