assertOpenCL  September 19, 2018
Macros
print.cl File Reference

Helper macros to use printf() function during development when it is available (from OpenCL 1.2). More...

Go to the source code of this file.

Macros

#define PRINT(str)   (printf(str))
 printf() function without paramters. More...
 
#define PRINT1(format, a)   (printf(format, a))
 printf() function with 1 paramter. More...
 
#define PRINT2(format, a, b)   (printf(format, a, b))
 printf() function with 2 paramters. More...
 
#define PRINT3(format, a, b, c)   (printf(format, a, b, c))
 printf() function with 3 paramters. More...
 
#define PRINT4(format, a, b, c, d)   (printf(format, a, b, c, d))
 printf() function with 4 paramters. More...
 
#define PRINT5(format, a, b, c, d, e)   (printf(format, a, b, c, d, e))
 printf() function with 5 paramters. More...
 
#define PRINT6(format, a, b, c, d, e, f)   (printf(format, a, b, c, d, e, f))
 printf() function with 6 paramters. More...
 
#define PRINT7(format, a, b, c, d, e, f, g)   (printf(format, a, b, c, d, e, f, g))
 printf() function with 7 paramters. More...
 
#define PRINT8(format, a, b, c, d, e, f, g, h)   (printf(format, a, b, c, d, e, f, g, h))
 printf() function with 8 paramters. More...
 
#define PRINT9(format, a, b, c, d, e, f, g, h, i)   (printf(format, a, b, c, d, e, f, g, h, i))
 printf() function with 9 paramters. More...
 

Detailed Description

Helper macros to use printf() function during development when it is available (from OpenCL 1.2).

If before OpenCL 1.2 or macro NDEBUG is defined or macro NPRINT is defined then these PRINT*() macros are simply ignored.

See examples of use in examples/kernel/example.cl

Official printf() function documentation: https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/printfFunction.html

Piece of assertOpenCL — GPLv3 — Copyright (C) 2018 Olivier Pirson — http://www.opimedia.be/ — September 16, 2018

Definition in file print.cl.

Macro Definition Documentation

◆ PRINT

#define PRINT (   str)    (printf(str))

printf() function without paramters.

Returns
int

Definition at line 67 of file print.cl.

◆ PRINT1

#define PRINT1 (   format,
 
)    (printf(format, a))

printf() function with 1 paramter.

Returns
int

Definition at line 75 of file print.cl.

◆ PRINT2

#define PRINT2 (   format,
  a,
 
)    (printf(format, a, b))

printf() function with 2 paramters.

Returns
int

Definition at line 83 of file print.cl.

◆ PRINT3

#define PRINT3 (   format,
  a,
  b,
 
)    (printf(format, a, b, c))

printf() function with 3 paramters.

Returns
int

Definition at line 91 of file print.cl.

◆ PRINT4

#define PRINT4 (   format,
  a,
  b,
  c,
 
)    (printf(format, a, b, c, d))

printf() function with 4 paramters.

Returns
int

Definition at line 99 of file print.cl.

◆ PRINT5

#define PRINT5 (   format,
  a,
  b,
  c,
  d,
 
)    (printf(format, a, b, c, d, e))

printf() function with 5 paramters.

Returns
int

Definition at line 107 of file print.cl.

◆ PRINT6

#define PRINT6 (   format,
  a,
  b,
  c,
  d,
  e,
 
)    (printf(format, a, b, c, d, e, f))

printf() function with 6 paramters.

Returns
int

Definition at line 115 of file print.cl.

◆ PRINT7

#define PRINT7 (   format,
  a,
  b,
  c,
  d,
  e,
  f,
 
)    (printf(format, a, b, c, d, e, f, g))

printf() function with 7 paramters.

Returns
int

Definition at line 123 of file print.cl.

◆ PRINT8

#define PRINT8 (   format,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
 
)    (printf(format, a, b, c, d, e, f, g, h))

printf() function with 8 paramters.

Returns
int

Definition at line 131 of file print.cl.

◆ PRINT9

#define PRINT9 (   format,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
 
)    (printf(format, a, b, c, d, e, f, g, h, i))

printf() function with 9 paramters.

Returns
int

Definition at line 139 of file print.cl.