tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
Loading...
Searching...
No Matches
Macros | Typedefs
config.h File Reference

Global configuration for the tesseract tensor library. More...

#include "error_handler/error_handler.h"
#include "error_handler/pc_error_handler.h"
Include dependency graph for config.h:

Go to the source code of this file.

Macros

#define FORCE_INLINE   inline
 Hint the compiler to always inline a function.
 
#define DEFINE_TYPE_ALIAS(type, name)   typedef type name
 Portable type alias macro.
 
#define TESSERACT_CONDITIONAL_NOEXCEPT
 
#define PRECISION_TOLERANCE   1e-4
 Tolerance for floating-point comparisons (e.g. symmetry checks, Cholesky).
 
#define my_size_t   size_t
 Size/index type used throughout the library.
 
#define TESSERACT_USE_FMAD
 Enable fused multiply-add pattern detection in expression evaluation.
 
Runtime Checks

Dynamic bounds and dimension validation.

#define RUNTIME_CHECK_DIMENSIONS_COUNT_MISMATCH
 Check number of indices/dimensions at runtime.
 
#define RUNTIME_CHECK_DIMENSIONS_SIZE_MISMATCH
 Check dimension sizes at runtime.
 
#define RUNTIME_USE_BOUNDS_CHECKING
 Enable element-access bounds checking.
 

Typedefs

using MyErrorHandler = ErrorHandler< PCErrorHandler >
 Platform-specific error handler selection.
 

Detailed Description

Global configuration for the tesseract tensor library.

Controls platform detection, error handling backend selection, debug output, compile-time vs runtime safety checks, and numeric precision settings. Intended to be included (directly or indirectly) by every translation unit in the library.

Macro Definition Documentation

◆ DEFINE_TYPE_ALIAS

#define DEFINE_TYPE_ALIAS (   type,
  name 
)    typedef type name

Portable type alias macro.

Uses using on C++11 and later, falls back to typedef for pre-C++11 compilers.

◆ FORCE_INLINE

#define FORCE_INLINE   inline

Hint the compiler to always inline a function.

Resolves to __attribute__((always_inline)) on GCC/Clang, __forceinline on MSVC, and plain inline elsewhere.

◆ my_size_t

#define my_size_t   size_t

Size/index type used throughout the library.

Defaults to size_t. Can be changed to uint32_t for memory-constrained targets.

◆ PRECISION_TOLERANCE

#define PRECISION_TOLERANCE   1e-4

Tolerance for floating-point comparisons (e.g. symmetry checks, Cholesky).

◆ RUNTIME_CHECK_DIMENSIONS_COUNT_MISMATCH

#define RUNTIME_CHECK_DIMENSIONS_COUNT_MISMATCH

Check number of indices/dimensions at runtime.

◆ RUNTIME_CHECK_DIMENSIONS_SIZE_MISMATCH

#define RUNTIME_CHECK_DIMENSIONS_SIZE_MISMATCH

Check dimension sizes at runtime.

◆ RUNTIME_USE_BOUNDS_CHECKING

#define RUNTIME_USE_BOUNDS_CHECKING

Enable element-access bounds checking.

◆ TESSERACT_CONDITIONAL_NOEXCEPT

#define TESSERACT_CONDITIONAL_NOEXCEPT

◆ TESSERACT_USE_FMAD

#define TESSERACT_USE_FMAD

Enable fused multiply-add pattern detection in expression evaluation.

Typedef Documentation

◆ MyErrorHandler

Platform-specific error handler selection.

On Arduino targets, errors are reported over serial via SerialErrorHandler. On desktop/PC targets, PCErrorHandler is used (typically throws exceptions or prints to stderr).