LibraryEnvironment

This class is used to manage the Library Environment. More…

#include "LibEnv.h"

Public Functions

Name
LibraryEnvironment()
Constructs the object.
~LibraryEnvironment()
Deletes the object.
void Set_GetTime(bool input_GetTime)
Sets Flag for getting computation time.
void Set_Verbosity(int input_verbosity)
Sets verbosity level.
void Set_inpNthreads(type_OMP_iReg nthreads)
Sets the input number of OMP threads.
void Get_ThreadPart(const type_OMP_iReg mythid_in, const type_OMP_iReg nthreads_in, const iReg nrows, iReg & firstrow, iReg & mynrows)
Gets first row and number of rows of the current thread partition.
void Upd_Comm(MPI_Comm Comm)
Updates MPI group and communicator.
bool Get_GetTime()
Gets the flag for getting computation time.
int Get_Verbosity()
Gets the verbosity level.
type_OMP_iReg Get_inpNthreads()
Get the input number of OMP threads.
MPI_Comm Get_currComm()
Get the current MPI communicator.
void AddMem(iReg iType, iExt len)
Add used memory.
void RmMem(iReg iType, iExt len)
Remove used memory.
void GetCurrMemInfo(rExt * Info)
Get current memory info.
void GetPeakMemInfo(rExt * Info)
Get peak memory info.
void PrintMemInfo(FILE * ofile)
Print memory info.

Detailed Description

class LibraryEnvironment;

This class is used to manage the Library Environment.

class LibraryEnvironment.

Public Functions Documentation

function LibraryEnvironment

LibraryEnvironment()

Constructs the object.

function ~LibraryEnvironment

~LibraryEnvironment()

Deletes the object.

function Set_GetTime

inline void Set_GetTime(
    bool input_GetTime
)

Sets Flag for getting computation time.

function Set_Verbosity

inline void Set_Verbosity(
    int input_verbosity
)

Sets verbosity level.

function Set_inpNthreads

inline void Set_inpNthreads(
    type_OMP_iReg nthreads
)

Sets the input number of OMP threads.

function Get_ThreadPart

void Get_ThreadPart(
    const type_OMP_iReg mythid_in,
    const type_OMP_iReg nthreads_in,
    const iReg nrows,
    iReg & firstrow,
    iReg & mynrows
)

Gets first row and number of rows of the current thread partition.

function Upd_Comm

inline void Upd_Comm(
    MPI_Comm Comm
)

Updates MPI group and communicator.

function Get_GetTime

inline bool Get_GetTime()

Gets the flag for getting computation time.

function Get_Verbosity

inline int Get_Verbosity()

Gets the verbosity level.

function Get_inpNthreads

inline type_OMP_iReg Get_inpNthreads()

Get the input number of OMP threads.

function Get_currComm

inline MPI_Comm Get_currComm()

Get the current MPI communicator.

function AddMem

void AddMem(
    iReg iType,
    iExt len
)

Add used memory.

Parameters:

  • iType variable type [bool,int,long int,float,double].
  • len number of iType variables.

function RmMem

void RmMem(
    iReg iType,
    iExt len
)

Remove used memory.

Parameters:

  • iType variable type [bool,int,long int,float,double].
  • len number of iType variables.

function GetCurrMemInfo

void GetCurrMemInfo(
    rExt * Info
)

Get current memory info.

Parameters:

  • Info Used memory [bool,int,long int,float,double,total].

function GetPeakMemInfo

void GetPeakMemInfo(
    rExt * Info
)

Get peak memory info.

Parameters:

  • Info Memory Peak [bool,int,long int,float,double,total].

function PrintMemInfo

void PrintMemInfo(
    FILE * ofile
)

Print memory info.

Parameters:

  • *ofile output file unit (if nullptr ==> print on stdout).

Updated on 12 February 2021 at 11:59:50 CET