cf4ocl (C Framework for OpenCL)  v2.1.0
Object-oriented framework for developing and benchmarking OpenCL projects in C/C++
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
_ccl_defs.h File Reference

(5ce357a)

Useful definitions used internally by cf4ocl. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ccl_if_err_create_goto(err, quark, error_condition, error_code, label, msg,...)
 If error is detected (error_code != no_error_code), create an error object (CCLErr) and go to the specified label. More...
 
#define ccl_if_err_goto(err, label)
 If error is detected in err object (err != NULL), go to the specified label. More...
 
#define ccl_if_err_propagate_goto(err_dest, err_src, label)
 Same as ccl_if_err_goto(), but rethrows error in a source CCLErr object to a new destination CCLErr object. More...
 

Detailed Description

Useful definitions used internally by cf4ocl.

This header is not part of the public API.

Author
Nuno Fachada
Date
2016

Definition in file _ccl_defs.h.

Macro Definition Documentation

#define ccl_if_err_create_goto (   err,
  quark,
  error_condition,
  error_code,
  label,
  msg,
  ... 
)
Value:
if (error_condition) { \
g_set_error(&(err), (quark), (error_code), (msg), ##__VA_ARGS__); \
g_debug(CCL_STRD); \
goto label; \
}

If error is detected (error_code != no_error_code), create an error object (CCLErr) and go to the specified label.

Parameters
[out]errCCLErr* object.
[in]quarkQuark indicating the error domain.
[in]error_conditionMust result to true in order to create error.
[in]error_codeError code to set.
[in]labelLabel to goto if error is detected.
[in]msgError message in case of error.
[in]...Extra parameters for error message.

Definition at line 91 of file _ccl_defs.h.

#define ccl_if_err_goto (   err,
  label 
)
Value:
if ((err) != NULL) { \
g_debug(CCL_STRD); \
goto label; \
}

If error is detected in err object (err != NULL), go to the specified label.

Parameters
[in]errCCLErr* object.
[in]labelLabel to goto if error is detected.

Definition at line 106 of file _ccl_defs.h.

#define ccl_if_err_propagate_goto (   err_dest,
  err_src,
  label 
)
Value:
if ((err_src) != NULL) { \
g_debug(CCL_STRD); \
g_propagate_error(err_dest, err_src); \
err_src = NULL; \
goto label; \
}

Same as ccl_if_err_goto(), but rethrows error in a source CCLErr object to a new destination CCLErr object.

Parameters
[out]err_destDestination CCLErr** object.
[in]err_srcSource CCLErr* object.
[in]labelLabel to goto if error is detected.

Definition at line 120 of file _ccl_defs.h.