Proto
Public Member Functions | Static Public Member Functions
Proto::memInfo< MEMTYPE > Class Template Reference

Public Member Functions

 memInfo ()
 constructor More...
 
void enterInfo (std::string file, unsigned int line, unsigned long int dataSize)
 insert function More...
 
void enterInfos (std::pair< std::string, unsigned int > a_position, describeInfo &a_elem)
 insert function More...
 
void addTracePoint ()
 insert function More...
 
void addTracePointHost ()
 insert function More...
 
bool fexists (std::string filename)
 check function More...
 
void printInfo ()
 

Static Public Member Functions

static memInfo< MEMTYPE > & getMemInfo ()
 

Constructor & Destructor Documentation

◆ memInfo()

template<MemType MEMTYPE = MEMTYPE_DEFAULT>
Proto::memInfo< MEMTYPE >::memInfo ( )
inline

constructor

default constructor

Member Function Documentation

◆ addTracePoint()

template<MemType MEMTYPE = MEMTYPE_DEFAULT>
void Proto::memInfo< MEMTYPE >::addTracePoint ( )
inline

insert function

add a memory trace point for the device memory

◆ addTracePointHost()

template<MemType MEMTYPE = MEMTYPE_DEFAULT>
void Proto::memInfo< MEMTYPE >::addTracePointHost ( )
inline

insert function

add a memory trace point for the host memory

◆ enterInfo()

template<MemType MEMTYPE = MEMTYPE_DEFAULT>
void Proto::memInfo< MEMTYPE >::enterInfo ( std::string  file,
unsigned int  line,
unsigned long int  dataSize 
)
inline

insert function

Enter information in a 'describeInfo' element element are defined by their location: file + line if the position does not exist, we create it

Parameters
fileis file position for a given Malloc
lineis line position in the file for a given Malloc
dataSizeis size for a given Malloc

◆ enterInfos()

template<MemType MEMTYPE = MEMTYPE_DEFAULT>
void Proto::memInfo< MEMTYPE >::enterInfos ( std::pair< std::string, unsigned int >  a_position,
describeInfo a_elem 
)
inline

insert function

Enter information in a 'describeInfo' element element are defined by their position: file + line if the position does not already exist, we create it

Parameters
positionis the position in the code for a given Malloc
a_elemcontains the related information for a position in an other mpi process (used with mpi)

◆ fexists()

template<MemType MEMTYPE = MEMTYPE_DEFAULT>
bool Proto::memInfo< MEMTYPE >::fexists ( std::string  filename)
inline

check function

check if a file exist. We avoid to rewrite a file when we print de memory trace.

◆ getMemInfo()

template<MemType MEMTYPE = MEMTYPE_DEFAULT>
static memInfo<MEMTYPE>& Proto::memInfo< MEMTYPE >::getMemInfo ( )
inlinestatic

trick to get only one instance of memInfo for a given MEMTYPE

◆ printInfo()

template<MemType MEMTYPE = MEMTYPE_DEFAULT>
void Proto::memInfo< MEMTYPE >::printInfo ( )
inline

display information stored in m_info and write the memory trace


The documentation for this class was generated from the following file: