Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
src
common
chrono_private.h
Go to the documentation of this file.
1
/* =============================================================================
2
** This file is part of the mmg software package for the tetrahedral
3
** mesh modification.
4
** Copyright (c) Bx INP/CNRS/Inria/UBordeaux/UPMC, 2004-
5
**
6
** mmg is free software: you can redistribute it and/or modify it
7
** under the terms of the GNU Lesser General Public License as published
8
** by the Free Software Foundation, either version 3 of the License, or
9
** (at your option) any later version.
10
**
11
** mmg is distributed in the hope that it will be useful, but WITHOUT
12
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14
** License for more details.
15
**
16
** You should have received a copy of the GNU Lesser General Public
17
** License and of the GNU General Public License along with mmg (in
18
** files COPYING.LESSER and COPYING). If not, see
19
** <http://www.gnu.org/licenses/>. Please read their terms carefully and
20
** use this copy of the mmg distribution only if you accept them.
21
** =============================================================================
22
*/
23
24
#ifndef CHRONO_H
25
#define CHRONO_H
26
27
#include <time.h>
28
#include "
mmgcommon_private.h
"
29
30
#ifndef MMG_POSIX
31
#include <windows.h>
32
#else
33
#include <sys/time.h>
34
#include <sys/resource.h>
35
#endif
36
37
#include "
mmg_core_export_private.h
"
38
39
#ifdef __cplusplus
40
extern
"C"
{
41
#endif
42
43
#ifndef ON
44
#define RESET 0
45
#define ON 1
46
#define OFF 2
47
#endif
48
49
#define BIG 1e6
50
#define BIG1 1e-6
51
#define TIMEMAX 12
52
60
typedef
struct
mytime
{
61
double
gini
,
gend
,
gdif
,
uini
,
uend
,
udif
,
sini
,
send
,
sdif
;
62
#ifdef MMG_POSIX
63
struct
timeval
rutim
;
64
struct
rusage ru;
65
#else
66
HANDLE
thisProcess
;
67
FILETIME
ftIni
,
ftEnd
,
ftSys
,
ftUser
;
68
SYSTEMTIME
stSys
,
stUser
;
69
LARGE_INTEGER
frequency
;
70
LARGE_INTEGER
rutim
;
71
#endif
72
int
call
;
73
}
mytime
;
74
75
76
/* prototypes */
77
LIBMMG_CORE_EXPORT
void
chrono
(
int
cmode,
mytime
*ptt);
78
LIBMMG_CORE_EXPORT
void
tminit
(
mytime
*t,
int
maxtim);
79
LIBMMG_CORE_EXPORT
void
printim
(
double
,
char
*);
80
81
#ifdef __cplusplus
82
}
83
#endif
84
85
#endif
chrono
LIBMMG_CORE_EXPORT void chrono(int cmode, mytime *ptt)
Function to measure time.
Definition:
chrono.c:49
tminit
LIBMMG_CORE_EXPORT void tminit(mytime *t, int maxtim)
Initialize mytime object.
Definition:
chrono.c:120
printim
LIBMMG_CORE_EXPORT void printim(double, char *)
Print real time.
Definition:
chrono.c:160
mmg_core_export_private.h
LIBMMG_CORE_EXPORT
#define LIBMMG_CORE_EXPORT
Definition:
mmg_core_export_private.h:31
mmgcommon_private.h
mytime
Chrono object.
Definition:
chrono_private.h:60
mytime::ftEnd
FILETIME ftEnd
Definition:
chrono_private.h:67
mytime::gdif
double gdif
Definition:
chrono_private.h:61
mytime::sdif
double sdif
Definition:
chrono_private.h:61
mytime::rutim
LARGE_INTEGER rutim
Definition:
chrono_private.h:70
mytime::ftIni
FILETIME ftIni
Definition:
chrono_private.h:67
mytime::gini
double gini
Definition:
chrono_private.h:61
mytime::stSys
SYSTEMTIME stSys
Definition:
chrono_private.h:68
mytime::ftSys
FILETIME ftSys
Definition:
chrono_private.h:67
mytime::call
int call
Definition:
chrono_private.h:72
mytime::stUser
SYSTEMTIME stUser
Definition:
chrono_private.h:68
mytime::ftUser
FILETIME ftUser
Definition:
chrono_private.h:67
mytime::frequency
LARGE_INTEGER frequency
Definition:
chrono_private.h:69
mytime::gend
double gend
Definition:
chrono_private.h:61
mytime::sini
double sini
Definition:
chrono_private.h:61
mytime::thisProcess
HANDLE thisProcess
Definition:
chrono_private.h:66
mytime::uini
double uini
Definition:
chrono_private.h:61
mytime::send
double send
Definition:
chrono_private.h:61
mytime::uend
double uend
Definition:
chrono_private.h:61
mytime::udif
double udif
Definition:
chrono_private.h:61
Generated on Tue Oct 29 2024 11:49:55 for Mmg by
1.9.6