TBCI Numerical high perf. C++ Library  2.8.0
Macros | Functions | Variables
tbci_param.h File Reference

This provides some parameters that control the behavior of various functions in the TBCI library. More...

#include "tbci/basics.h"
Include dependency graph for tbci_param.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _TBCI_FLAG_ERRCHECK   1
 
#define _TBCI_FLAG_EXPCHECK   2
 
#define _TBCI_FLAG_ABORT   4
 
#define _TBCI_FLAG_EXCEPT   8
 
#define _TBCI_FLAG_EXACTSUM   16
 
#define _TBCI_FLAG_EXACTSUM2   32
 
#define _TBCI_CWD_DEFAULT   (_TBCI_FLAG_ERRCHECK | _TBCI_FLAG_EXPCHECK | _TBCI_FLAG_EXCEPT)
 
#define GET_T_CWD   tbci_control
 
#define CWD_CTRL_FCTS(NAME, FLAG)
 
#define CWD_CTRL_DISABLED(NAME)
 

Functions

void set_errcheck (bool val)
 
unsigned int do_errcheck ()
 
void set_expcheck (bool val)
 
unsigned int do_expcheck ()
 
void set_abort (bool val)
 
unsigned int do_abort ()
 
void set_except (bool val)
 
unsigned int do_except ()
 
void set_exactsum (bool val)
 
unsigned int do_exactsum ()
 
void set_exactsum2 (bool val)
 
unsigned int do_exactsum2 ()
 

Variables

unsigned int tbci_control
 

Detailed Description

This provides some parameters that control the behavior of various functions in the TBCI library.

The behavior of the TBCI lib is controlled by the following settings:

The TBCI configuration is stored in the control word TBCI::tbci_control; this variable is contained (weakly) in the smp.cc file (because that's the only place in TBCI where we have global static variables). If you don't link with the smp object (by -ltbcismp), you need to put

namespace TBCI { unsigned int tbci_control = _TBCI_CWD_DEFAULT; };

in your main program. (However, as SMP support is enabled by default nowadays, chances are that you'll have to link against -ltbcismp anyway.)

Definition in file tbci_param.h.

Macro Definition Documentation

#define _TBCI_CWD_DEFAULT   (_TBCI_FLAG_ERRCHECK | _TBCI_FLAG_EXPCHECK | _TBCI_FLAG_EXCEPT)

Definition at line 69 of file tbci_param.h.

#define _TBCI_FLAG_ABORT   4

Definition at line 64 of file tbci_param.h.

#define _TBCI_FLAG_ERRCHECK   1

Definition at line 62 of file tbci_param.h.

#define _TBCI_FLAG_EXACTSUM   16

Definition at line 66 of file tbci_param.h.

#define _TBCI_FLAG_EXACTSUM2   32

Definition at line 67 of file tbci_param.h.

#define _TBCI_FLAG_EXCEPT   8

Definition at line 65 of file tbci_param.h.

#define _TBCI_FLAG_EXPCHECK   2

Definition at line 63 of file tbci_param.h.

#define CWD_CTRL_DISABLED (   NAME)
Value:
void inline set_##NAME(bool val) \
{ \
if (val) \
fprintf(stderr, "TBCI warning: Attempt to set " #NAME ", which is disabled.\n"); \
}; \
inline unsigned int do_##NAME() \
{ \
return 0; \
}
return
Definition: LM_fit.h:82
if(value==0) return 1

Definition at line 127 of file tbci_param.h.

#define CWD_CTRL_FCTS (   NAME,
  FLAG 
)
Value:
void inline set_##NAME(bool val) \
{ \
unsigned int& cwd = GET_T_CWD; \
if (val) \
cwd |= FLAG; \
else \
cwd &= ~(FLAG); \
}; \
inline unsigned int do_##NAME() \
{ \
const unsigned int cwd = GET_T_CWD; \
return cwd & FLAG; \
}
#define GET_T_CWD
Definition: tbci_param.h:109
return
Definition: LM_fit.h:82
if(value==0) return 1

Definition at line 112 of file tbci_param.h.

#define GET_T_CWD   tbci_control

Definition at line 109 of file tbci_param.h.

Function Documentation

unsigned int do_abort ( )
inline

Definition at line 148 of file tbci_param.h.

unsigned int do_errcheck ( )
inline

Definition at line 141 of file tbci_param.h.

unsigned int do_exactsum ( )
inline
unsigned int do_exactsum2 ( )
inline
unsigned int do_except ( )
inline

Definition at line 149 of file tbci_param.h.

unsigned int do_expcheck ( )
inline

Definition at line 144 of file tbci_param.h.

Referenced by DiagPreconditioner< T, MatrixType >::update().

void set_abort ( bool  val)
inline

Definition at line 148 of file tbci_param.h.

void set_errcheck ( bool  val)
inline

Definition at line 141 of file tbci_param.h.

void set_exactsum ( bool  val)
inline

Definition at line 150 of file tbci_param.h.

void set_exactsum2 ( bool  val)
inline

Definition at line 151 of file tbci_param.h.

void set_except ( bool  val)
inline

Definition at line 149 of file tbci_param.h.

void set_expcheck ( bool  val)
inline

Definition at line 144 of file tbci_param.h.

Variable Documentation

unsigned int tbci_control