BeBOP Optimized Sparse Kernel Interface Library  1.0.1h
Defines
abort_prog.h File Reference

Macro to abort a program on error. More...

#include <stdio.h>
#include <oski/common.h>

Go to the source code of this file.

Defines

#define INC_UTIL_ABORT_PROG_H
 tests/test_util.h included.
#define ABORT(cond, method, err)
 If the given condition is true, calls the generic BeBOP error reporting macro, OSKI_ERR, and aborts the current program with exit code 1.

Detailed Description

Macro to abort a program on error.


Define Documentation

#define ABORT (   cond,
  method,
  err 
)
Value:
if(cond) { \
        fprintf( stderr, "*** Error condition '%s' detected ***\n", \
            MACRO_TO_STRING(cond) ); \
        OSKI_ERR(method, err); \
        exit(1); \
    }

If the given condition is true, calls the generic BeBOP error reporting macro, OSKI_ERR, and aborts the current program with exit code 1.

Parameters:
[in]condA boolean condition expression.
[in]methodCalling function from which to report the error. This parameter is converted to a string via MACRO_TO_STRING(method).
[in]errBeBOP error code.

Referenced by CalcMax(), CalcMean(), CalcMin(), CalcMinMaxMean(), CalcMinMaxMedian(), Check(), check_case_row_write(), check_MatConjTransMult(), check_MatMult(), check_MatMult_instance(), check_MatMultAndMatTransMult_instance(), check_MatTransMatMult_instance(), check_MatTransMult(), check_MatTrisolve_instance(), check_row_write(), check_values(), create_rawmat_csr(), expand_rawmat_csr(), GenTriMat(), GetShapeBounds(), main(), run_read_write_test_battery(), testmat_ChangeSizeDenseCSR(), testmat_ChangeSizeDenseTriCSR(), testmat_GenBlockedBandedCSR(), testmat_GenDenseCSR(), testmat_GenRandomCSR(), testmat_GenTriCSR(), and testvec_Create().

tests/test_util.h included.