TECA
TECA
core
teca_memory_profiler.h
1
#ifndef teca_memory_profiler_h
2
#define teca_memory_profiler_h
3
4
#include "teca_mpi.h"
5
#include <string>
6
7
extern
"C"
void
*profile(
void
*argp);
8
9
// MemoryProfiler - A sampling memory use profiler
17
class
teca_memory_profiler
18
{
19
public
:
20
teca_memory_profiler
();
21
~
teca_memory_profiler
();
22
23
teca_memory_profiler
(
const
teca_memory_profiler
&) =
delete
;
24
void
operator=(
const
teca_memory_profiler
&) =
delete
;
25
26
// start and stop the profiler
27
int
initialize();
28
int
finalize();
29
30
// Set the interval in seconds between querrying
31
// the processes memory use.
32
void
set_interval(
double
interval);
33
double
get_interval()
const
;
34
35
// Set the comunicator for parallel I/O
36
void
set_communicator(MPI_Comm comm);
37
38
// Set the file name to write the data to
39
void
set_filename(
const
std::string &filename);
40
const
char
*get_filename()
const
;
41
42
friend
void
*profile(
void
*argp);
43
44
private
:
45
struct
internals_type
;
46
internals_type
*internals;
47
};
48
49
#endif
teca_memory_profiler::internals_type
Definition:
teca_memory_profiler.cxx:192
teca_memory_profiler
Definition:
teca_memory_profiler.h:18
Generated by
1.8.20