assertOpenCL  September 19, 2018
Macros | Functions
example.cl File Reference

Simple example of use of assert*() and PRINT*() macros. More...

#include "assert.cl"
#include "print.cl"
Include dependency graph for example.cl:

Go to the source code of this file.

Macros

#define NPRINT
 
#define NASSERT_NOT_DEFINED
 
#define NASSERT
 

Functions

void foo (ASSERT_DECLARE_UNIQUE_PARAMS)
 
void foo2 (unsigned int n ASSERT_DECLARE_PARAMS)
 
unsigned int bar (unsigned int n ASSERT_DECLARE_PARAMS)
 
__kernel void example (const unsigned int in, __global unsigned int *const outs ASSERT_DECLARE_PARAMS)
 

Detailed Description

Simple example of use of assert*() and PRINT*() macros.

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

Definition in file example.cl.

Macro Definition Documentation

◆ NASSERT

#define NASSERT

◆ NASSERT_NOT_DEFINED

#define NASSERT_NOT_DEFINED

◆ NPRINT

#define NPRINT

Function Documentation

◆ bar()

unsigned int bar ( unsigned int n  ASSERT_DECLARE_PARAMS)

Example of function with a return value that contains assertions.

Parameters
n
Returns
n*2

Definition at line 61 of file example.cl.

◆ example()

__kernel void example ( const unsigned int  in,
__global unsigned int *const outs  ASSERT_DECLARE_PARAMS 
)

Example of kernel function that contains assertions.

Parameters
in
outs

Definition at line 83 of file example.cl.

◆ foo()

Example of function without return value that contains assertions.

Definition at line 25 of file example.cl.

◆ foo2()

void foo2 ( unsigned int n  ASSERT_DECLARE_PARAMS)

Example of function without return value that contains assertions.

Parameters
n

Definition at line 44 of file example.cl.