Toggle navigation
SCIP Optimization Suite
SCIP
SoPlex
ZIMPL
UG
GCG
Documentation
SCIP 9.2.0
SCIP 8.1.0
SCIP 7.0.3
SCIP 6.0.2
SCIP 5.0.1
SCIP 4.0.1
SCIP 3.2.1
SCIP
Solving Constraint Integer Programs
struct_clock.h
Go to the documentation of this file.
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2
/* */
3
/* This file is part of the program and library */
4
/* SCIP --- Solving Constraint Integer Programs */
5
/* */
6
/* Copyright (C) 2002-2017 Konrad-Zuse-Zentrum */
7
/* fuer Informationstechnik Berlin */
8
/* */
9
/* SCIP is distributed under the terms of the ZIB Academic License. */
10
/* */
11
/* You should have received a copy of the ZIB Academic License */
12
/* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13
/* */
14
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15
16
/**@file struct_clock.h
17
* @ingroup INTERNALAPI
18
* @brief datastructures for clocks and timing issues
19
* @author Tobias Achterberg
20
*/
21
22
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23
24
#ifndef __SCIP_STRUCT_CLOCK_H__
25
#define __SCIP_STRUCT_CLOCK_H__
26
27
28
#if defined(_WIN32) || defined(_WIN64)
29
#include <time.h>
30
#else
31
#include <sys/times.h>
32
#endif
33
34
#include "
scip/def.h
"
35
#include "
scip/type_clock.h
"
36
37
#ifdef __cplusplus
38
extern
"C"
{
39
#endif
40
41
/** CPU clock counter */
42
struct
SCIP_CPUClock
43
{
44
clock_t
user
;
/**< clock ticks for user CPU time */
45
};
46
47
/** wall clock counter */
48
struct
SCIP_WallClock
49
{
50
long
sec
;
/**< seconds counter */
51
long
usec
;
/**< microseconds counter */
52
};
53
54
/** clock timer */
55
struct
SCIP_Clock
56
{
57
union
58
{
59
SCIP_CPUCLOCK
cpuclock
;
/**< CPU clock counter */
60
SCIP_WALLCLOCK
wallclock
;
/**< wall clock counter */
61
} data;
62
SCIP_Real
lasttime
;
/**< last validated time of clock */
63
int
nruns
;
/**< number of SCIPclockStart() calls without SCIPclockStop() calls */
64
SCIP_CLOCKTYPE
clocktype
;
/**< current type of clock used */
65
SCIP_Bool
usedefault
;
/**< should the clock's type be overruled by the default clock type? */
66
SCIP_Bool
enabled
;
/**< should the clock be used? */
67
};
68
69
#ifdef __cplusplus
70
}
71
#endif
72
73
#endif
SCIP_WallClock
Definition:
struct_clock.h:48
SCIP_WallClock::usec
long usec
Definition:
struct_clock.h:51
SCIP_Clock::usedefault
SCIP_Bool usedefault
Definition:
struct_clock.h:65
SCIP_Clock::wallclock
SCIP_WALLCLOCK wallclock
Definition:
struct_clock.h:60
SCIP_Clock::clocktype
SCIP_CLOCKTYPE clocktype
Definition:
struct_clock.h:64
SCIP_CLOCKTYPE
enum SCIP_ClockType SCIP_CLOCKTYPE
Definition:
type_clock.h:38
SCIP_WallClock::sec
long sec
Definition:
struct_clock.h:50
SCIP_Clock::enabled
SCIP_Bool enabled
Definition:
struct_clock.h:66
SCIP_Clock::lasttime
SCIP_Real lasttime
Definition:
struct_clock.h:62
SCIP_CPUClock
Definition:
struct_clock.h:42
SCIP_CPUClock::user
clock_t user
Definition:
struct_clock.h:44
SCIP_Bool
#define SCIP_Bool
Definition:
def.h:61
SCIP_Clock::cpuclock
SCIP_CPUCLOCK cpuclock
Definition:
struct_clock.h:59
type_clock.h
type definitions for clocks and timing issues
SCIP_Clock::nruns
int nruns
Definition:
struct_clock.h:63
SCIP_Real
#define SCIP_Real
Definition:
def.h:145
def.h
common defines and data types used in all packages of SCIP
SCIP_Clock
Definition:
struct_clock.h:55