This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCOREMOD_tools.h
189 lines (103 loc) · 3.7 KB
/
COREMOD_tools.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#ifndef _TOOLS_H
#define _TOOLS_H
void __attribute__((constructor)) libinit_COREMOD_tools();
/** @brief Log function call to file */
void CORE_logFunctionCall(
const int funclevel,
const int loglevel,
const int logfuncMODE,
const char *FileName,
const char *FunctionName,
const long line,
char *comments
);
struct timespec timespec_diff(
struct timespec start,
struct timespec end
);
double timespec_diff_double(
struct timespec start,
struct timespec end
);
int COREMOD_TOOLS_mvProcCPUset(const char *csetname);
int create_counter_file(const char *fname, unsigned long NBpts);
int bubble_sort(double *array, unsigned long count);
void qs_float(float *array, unsigned long left, unsigned long right);
void qs_long(long *array, unsigned long left, unsigned long right);
void qs_double(double *array, unsigned long left, unsigned long right);
void qs_ushort(unsigned short *array, unsigned long left, unsigned long right);
void quick_sort_float(float *array, unsigned long count);
void quick_sort_long(long *array, unsigned long count);
void quick_sort_double(double *array, unsigned long count);
void quick_sort_ushort(unsigned short *array, unsigned long count);
void qs3(double *array, double *array1, double *array2, unsigned long left,
unsigned long right);
void qs3_double(double *array, double *array1, double *array2,
unsigned long left, unsigned long right);
void quick_sort3(double *array, double *array1, double *array2,
unsigned long count);
void quick_sort3_float(float *array, float *array1, float *array2,
unsigned long count);
void quick_sort3_double(double *array, double *array1, double *array2,
unsigned long count);
void qs2l(double *array, long *array1, unsigned long left, unsigned long right);
void quick_sort2l(double *array, long *array1, unsigned long count);
void quick_sort2l_double(double *array, long *array1, unsigned long count);
void quick_sort2ul_double(double *array, unsigned long *array1,
unsigned long count);
void quick_sort3ll_double(double *array, long *array1, long *array2,
unsigned long count);
void quick_sort3ulul_double(double *array, unsigned long *array1,
unsigned long *array2, unsigned long count);
errno_t lin_regress(
double *a,
double *b,
double *Xi2,
double *x,
double *y,
double *sig,
unsigned int nb_points
);
int replace_char(char *content, char cin, char cout);
int read_config_parameter_exists(const char *config_file, const char *keyword);
int read_config_parameter(const char *config_file, const char *keyword,
char *content);
float read_config_parameter_float(const char *config_file, const char *keyword);
long read_config_parameter_long(const char *config_file, const char *keyword);
int read_config_parameter_int(const char *config_file, const char *keyword);
long file_number_lines(const char *file_name);
FILE *open_file_w(const char *filename);
FILE *open_file_r(const char *filename);
errno_t write_1D_array(
double *array,
long nbpoints,
const char *filename
);
errno_t read_1D_array(
double *array,
long nbpoints,
const char *filename
);
errno_t tp(
const char *word
);
int read_int_file(
const char *fname
);
errno_t write_int_file(
const char *fname,
int value
);
errno_t write_float_file(
const char *fname,
float value
);
errno_t COREMOD_TOOLS_imgdisplay3D(
const char *IDname,
long step
);
imageID COREMOD_TOOLS_statusStat(
const char *IDstat_name,
long indexmax
);
#endif