MeVisLab Toolbox Reference
ml::library Namespace Reference

Functions

void init ()
 Initializes the ML, the runtime type system, the memory manager, fields, static buffers, error and debug printings etc. More...
 
void destroy ()
 Delete dynamic data structures allocated by init(). More...
 
void setupFromEnvironmentVariables ()
 Set ML state dependent on environment variables. More...
 

Function Documentation

◆ destroy()

◆ init()

void ml::library::init ( )

Initializes the ML, the runtime type system, the memory manager, fields, static buffers, error and debug printings etc.

It also calls setupFromEnvironmentVariables to adapt settings to environment variables. It can only be called once, it will do nothing when called again.

Referenced by ml::CSOObjectVector< T >::CSOObjectVector(), ml::LUTData< T >::init(), ml::CSOObjectVector< T >::reserve(), ml::WEMVector< T, fixedBufferSize >::reserve(), ml::WEMFastVector< T >::WEMFastVector(), ml::WEMIndexVector< T >::WEMIndexVector(), ml::WEMObjectVector< T >::WEMObjectVector(), and ml::WEMVector< T, fixedBufferSize >::WEMVector().

◆ setupFromEnvironmentVariables()

void ml::library::setupFromEnvironmentVariables ( )

Set ML state dependent on environment variables.

The following environment variables are supported by the ML:

  • ML_NUM_THREADS Maximum number of permitted threads; 0,1=Multithreading off,
  • ML_USE_EXCEPTIONS If not zero or undefined then the ML tries to catch all exceptions. If defined and zero then the ML crashes on errors (useful for debugging purposes). This value has no effect in release mode; there the ML tries to catch all exceptions even if this flag is off. Default=1.
  • ML_DEBUG_ON and ML_DEBUG_ALL control the output of debug information. See mlDebug.h for more information.
  • ML_MESSAGE_FILTER Allows to filter the debug messages.
  • ML_CACHE_SIZE_IN_KB defines the size of the memory cache in kilobytes.