CppADCodeGen
2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
pthread_pool_h.hpp
1
const
char
CPPADCG_PTHREAD_POOL_H_FILE[] = R
"*=*(#ifndef CPPADCG_PTHREAD_POOL_H
2
#define CPPADCG_PTHREAD_POOL_H
3
/* --------------------------------------------------------------------------
4
* CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation:
5
* Copyright (C) 2016 Ciengis
6
*
7
* CppADCodeGen is distributed under multiple licenses:
8
*
9
* - Eclipse Public License Version 1.0 (EPL1), and
10
* - GNU General Public License Version 3 (GPL3).
11
*
12
* EPL1 terms and conditions can be found in the file "epl-v10.txt", while
13
* terms and conditions for the GPL3 can be found in the file "gpl3.txt".
14
* ----------------------------------------------------------------------------
15
* Author: Joao Leal
16
*/
17
18
#ifdef __cplusplus
19
extern "C" {
20
#endif
21
22
enum ScheduleStrategy {SCHED_STATIC = 1,
23
SCHED_DYNAMIC = 2,
24
SCHED_GUIDED = 3
25
};
26
27
enum ElapsedTimeReference {ELAPSED_TIME_AVG,
28
ELAPSED_TIME_MIN};
29
30
typedef void (*cppadcg_thpool_function_type)(void*);
31
32
33
void cppadcg_thpool_set_threads(int n);
34
35
int cppadcg_thpool_get_threads();
36
37
38
void cppadcg_thpool_set_scheduler_strategy(enum ScheduleStrategy s);
39
40
enum ScheduleStrategy cppadcg_thpool_get_scheduler_strategy();
41
42
43
void cppadcg_thpool_set_guided_maxgroupwork(float v);
44
45
float cppadcg_thpool_get_guided_maxgroupwork();
46
47
48
unsigned int cppadcg_thpool_get_n_time_meas();
49
50
void cppadcg_thpool_set_n_time_meas(unsigned int n);
51
52
53
enum ElapsedTimeReference cppadcg_thpool_get_time_meas_ref();
54
55
void cppadcg_thpool_set_time_meas_ref(enum ElapsedTimeReference r);
56
57
58
void cppadcg_thpool_set_verbose(int v);
59
60
int cppadcg_thpool_is_verbose();
61
62
63
void cppadcg_thpool_set_disabled(int disabled);
64
65
int cppadcg_thpool_is_disabled();
66
67
68
void cppadcg_thpool_prepare();
69
70
void cppadcg_thpool_add_job(cppadcg_thpool_function_type function,
71
void* arg,
72
const float* avgElapsed,
73
float* elapsed);
74
75
void cppadcg_thpool_add_jobs(cppadcg_thpool_function_type functions[],
76
void* args[],
77
const float refElapsed[],
78
float elapsed[],
79
const int order[],
80
int job2Thread[],
81
int nJobs,
82
int lastElapsedChanged);
83
84
void cppadcg_thpool_wait();
85
86
void cppadcg_thpool_update_order(float refElapsed[],
87
unsigned int nTimeMeas,
88
const float elapsed[],
89
int order[],
90
int nJobs);
91
92
void cppadcg_thpool_shutdown();
93
94
#ifdef __cplusplus
95
}
96
#endif
97
98
#endif
99
)*=*";
100
101
const
size_t
CPPADCG_PTHREAD_POOL_H_FILE_SIZE = 2730;
102
include
cppad
cg
model
threadpool
pthread_pool_h.hpp
Generated on Tue Jan 23 2024 12:29:55 for CppADCodeGen by
1.9.1