Chi-Tech
chi_console_structs.h
Go to the documentation of this file.
1#ifndef CHI_CONSOLE_STRUCTS_H
2#define CHI_CONSOLE_STRUCTS_H
3
4//=============================================================================
5namespace chi
6{
7 /**Simple structure for memory usage.*/
8 struct CSTMemory
9 {
10 double memory_bytes = 0.0;
11 double memory_kbytes = 0.0;
12 double memory_mbytes = 0.0;
13 double memory_gbytes = 0.0;
14
15 CSTMemory() = default;
16
17 explicit CSTMemory(double in_mem)
18 {
19 memory_bytes = in_mem;
20 memory_kbytes = in_mem/1024.0;
21 memory_mbytes = in_mem/1024.0/1024.0;
22 memory_gbytes = in_mem/1024.0/1024.0;
23 }
24
25 CSTMemory& operator=(const CSTMemory& in_struct) = default;
26 };
27}
28
29#endif
CSTMemory & operator=(const CSTMemory &in_struct)=default
CSTMemory()=default
CSTMemory(double in_mem)