gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
OS.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef OS_H
7 #define OS_H
8 
9 #include <string>
10 #include <stdio.h>
11 
12 FILE *Fopen(const char *f, const char *mode);
13 std::string GetEnvironmentVar(const std::string &var);
14 void SetEnvironmentVar(const std::string &var, const std::string &val);
15 void SleepInSeconds(double s);
16 void CheckResources();
17 double Cpu();
18 double TotalRam();
19 double TimeOfDay();
20 long GetMemoryUsage();
21 int GetProcessId();
22 std::string GetExecutableFileName();
23 std::string GetAbsolutePath(const std::string &fileName);
24 std::string GetHostName();
25 int UnlinkFile(const std::string &fileName);
26 int StatFile(const std::string &fileName);
27 int KillProcess(int pid);
28 int CreateSingleDir(const std::string &dirName);
29 void CreatePath(const std::string &fullPath);
30 int SystemCall(const std::string &command, bool blocking = false);
31 int SystemCallExe(const std::string &exe, const std::string &argsOrCommand,
32  bool blocking = false);
33 void RedirectIOToConsole();
34 void UnzipFile(const std::string &fileName, const std::string &prependDir = "");
35 
36 #endif
GetProcessId
int GetProcessId()
Definition: OS.cpp:414
RedirectIOToConsole
void RedirectIOToConsole()
Definition: OS.cpp:642
GetEnvironmentVar
std::string GetEnvironmentVar(const std::string &var)
Definition: OS.cpp:284
GetMemoryUsage
long GetMemoryUsage()
Definition: OS.cpp:406
CreatePath
void CreatePath(const std::string &fullPath)
Definition: OS.cpp:513
KillProcess
int KillProcess(int pid)
Definition: OS.cpp:525
StatFile
int StatFile(const std::string &fileName)
Definition: OS.cpp:489
GetExecutableFileName
std::string GetExecutableFileName()
Definition: OS.cpp:423
CheckResources
void CheckResources()
Definition: OS.cpp:347
LegendrePolynomials::f
void f(int n, double u, double *val)
Definition: orthogonalBasis.cpp:77
CreateSingleDir
int CreateSingleDir(const std::string &dirName)
Definition: OS.cpp:502
Fopen
FILE * Fopen(const char *f, const char *mode)
Definition: OS.cpp:273
UnzipFile
void UnzipFile(const std::string &fileName, const std::string &prependDir="")
Definition: OS.cpp:696
GetAbsolutePath
std::string GetAbsolutePath(const std::string &fileName)
Definition: OS.cpp:454
UnlinkFile
int UnlinkFile(const std::string &fileName)
Definition: OS.cpp:479
SleepInSeconds
void SleepInSeconds(double s)
Definition: OS.cpp:315
TimeOfDay
double TimeOfDay()
Definition: OS.cpp:399
Cpu
double Cpu()
Definition: OS.cpp:366
SystemCallExe
int SystemCallExe(const std::string &exe, const std::string &argsOrCommand, bool blocking=false)
Definition: OS.cpp:539
TotalRam
double TotalRam()
Definition: OS.cpp:374
GetHostName
std::string GetHostName()
Definition: OS.cpp:472
SetEnvironmentVar
void SetEnvironmentVar(const std::string &var, const std::string &val)
Definition: OS.cpp:305
SystemCall
int SystemCall(const std::string &command, bool blocking=false)
Definition: OS.cpp:637