cacao  Release 0.1.03-dev
Compute And Control For Adaptive Optics
COREMOD_tools.h
Go to the documentation of this file.
1 #ifndef _TOOLS_H
2 #define _TOOLS_H
3 
4 
5 void __attribute__((constructor)) libinit_COREMOD_tools();
6 
7 
8 int COREMOD_TOOLS_mvProcCPUset(const char *csetname);
9 
10 int create_counter_file(const char *fname, unsigned long NBpts);
11 
12 int bubble_sort(double *array, unsigned long count);
13 
14 void qs_float(float *array, unsigned long left, unsigned long right);
15 void qs_long(long *array, unsigned long left, unsigned long right);
16 void qs_double(double *array, unsigned long left, unsigned long right);
17 void qs_ushort(unsigned short *array, unsigned long left, unsigned long right);
18 
19 void quick_sort_float(float *array, unsigned long count);
20 void quick_sort_long(long *array, unsigned long count);
21 void quick_sort_double(double *array, unsigned long count);
22 void quick_sort_ushort(unsigned short *array, unsigned long count);
23 
24 void qs3(double *array, double *array1, double *array2, unsigned long left,
25  unsigned long right);
26 
27 void qs3_double(double *array, double *array1, double *array2,
28  unsigned long left, unsigned long right);
29 
30 void quick_sort3(double *array, double *array1, double *array2,
31  unsigned long count);
32 void quick_sort3_float(float *array, float *array1, float *array2,
33  unsigned long count);
34 void quick_sort3_double(double *array, double *array1, double *array2,
35  unsigned long count);
36 
37 void qs2l(double *array, long *array1, unsigned long left, unsigned long right);
38 
39 void quick_sort2l(double *array, long *array1, unsigned long count);
40 
41 void quick_sort2l_double(double *array, long *array1, unsigned long count);
42 void quick_sort2ul_double(double *array, unsigned long *array1,
43  unsigned long count);
44 
45 void quick_sort3ll_double(double *array, long *array1, long *array2,
46  unsigned long count);
47 void quick_sort3ulul_double(double *array, unsigned long *array1,
48  unsigned long *array2, unsigned long count);
49 
50 
52  double *a,
53  double *b,
54  double *Xi2,
55  double *x,
56  double *y,
57  double *sig,
58  unsigned int nb_points
59 );
60 
61 
62 int replace_char(char *content, char cin, char cout);
63 
64 int read_config_parameter_exists(const char *config_file, const char *keyword);
65 
66 int read_config_parameter(const char *config_file, const char *keyword,
67  char *content);
68 
69 float read_config_parameter_float(const char *config_file, const char *keyword);
70 
71 long read_config_parameter_long(const char *config_file, const char *keyword);
72 
73 int read_config_parameter_int(const char *config_file, const char *keyword);
74 
75 long file_number_lines(const char *file_name);
76 
77 FILE *open_file_w(const char *filename);
78 
79 FILE *open_file_r(const char *filename);
80 
81 
83  double *array,
84  long nbpoints,
85  const char *filename
86 );
87 
88 
90  double *array,
91  long nbpoints,
92  const char *filename
93 );
94 
95 
96 errno_t tp(
97  const char *word
98 );
99 
100 
101 int read_int_file(
102  const char *fname
103 );
104 
106  const char *fname,
107  int value
108 );
109 
110 
112  const char *fname,
113  float value
114 );
115 
117  const char *IDname,
118  long step
119 );
120 
122  const char *IDstat_name,
123  long indexmax
124 );
125 
126 #endif
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
141 
142 
143 
144 
145 
146 
147 
148 
149 
150 
151 
152 
153 
154 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
void qs_float(float *array, unsigned long left, unsigned long right)
Definition: COREMOD_tools.c:360
void quick_sort_long(long *array, unsigned long count)
Definition: COREMOD_tools.c:1111
void qs_ushort(unsigned short *array, unsigned long left, unsigned long right)
Definition: COREMOD_tools.c:511
int replace_char(char *content, char cin, char cout)
Definition: COREMOD_tools.c:1221
void quick_sort_double(double *array, unsigned long count)
Definition: COREMOD_tools.c:1116
int read_config_parameter(const char *config_file, const char *keyword, char *content)
Definition: COREMOD_tools.c:1281
void quick_sort2ul_double(double *array, unsigned long *array1, unsigned long count)
Definition: COREMOD_tools.c:1159
int read_int_file(const char *fname)
Definition: COREMOD_tools.c:1484
imageID COREMOD_TOOLS_statusStat(const char *IDstat_name, long indexmax)
Definition: COREMOD_tools.c:1636
void quick_sort2l(double *array, long *array1, unsigned long count)
Definition: COREMOD_tools.c:1144
void quick_sort_ushort(unsigned short *array, unsigned long count)
Definition: COREMOD_tools.c:1121
errno_t read_1D_array(double *array, long nbpoints, const char *filename)
Definition: COREMOD_tools.c:1446
int read_config_parameter_int(const char *config_file, const char *keyword)
Definition: COREMOD_tools.c:1355
void qs2l(double *array, long *array1, unsigned long left, unsigned long right)
Definition: COREMOD_tools.c:751
void qs_long(long *array, unsigned long left, unsigned long right)
Definition: COREMOD_tools.c:411
int errno_t
Definition: AOloopControl_IOtools.h:20
FILE * open_file_r(const char *filename)
Definition: COREMOD_tools.c:1410
long imageID
Definition: CLIcore.h:54
int bubble_sort(double *array, unsigned long count)
Definition: COREMOD_tools.c:338
errno_t lin_regress(double *a, double *b, double *Xi2, double *x, double *y, double *sig, unsigned int nb_points)
Definition: COREMOD_tools.c:1179
void quick_sort3_double(double *array, double *array1, double *array2, unsigned long count)
Definition: COREMOD_tools.c:1138
void quick_sort3(double *array, double *array1, double *array2, unsigned long count)
Definition: COREMOD_tools.c:1126
errno_t write_float_file(const char *fname, float value)
Definition: COREMOD_tools.c:1532
void __attribute__((constructor)) libinit_COREMOD_tools()
Initialize module.
Definition: ImageStreamIO.c:77
void quick_sort3ll_double(double *array, long *array1, long *array2, unsigned long count)
Definition: COREMOD_tools.c:1165
errno_t write_int_file(const char *fname, int value)
Definition: COREMOD_tools.c:1510
void qs3_double(double *array, double *array1, double *array2, unsigned long left, unsigned long right)
Definition: COREMOD_tools.c:688
long read_config_parameter_long(const char *config_file, const char *keyword)
Definition: COREMOD_tools.c:1342
int COREMOD_TOOLS_mvProcCPUset(const char *csetname)
Definition: COREMOD_tools.c:276
errno_t COREMOD_TOOLS_imgdisplay3D(const char *IDname, long step)
Definition: COREMOD_tools.c:1575
void quick_sort_float(float *array, unsigned long count)
Definition: COREMOD_tools.c:1106
int create_counter_file(const char *fname, unsigned long NBpts)
Definition: COREMOD_tools.c:310
float read_config_parameter_float(const char *config_file, const char *keyword)
Definition: COREMOD_tools.c:1329
errno_t tp(const char *word)
Definition: COREMOD_tools.c:1473
FILE * open_file_w(const char *filename)
Definition: COREMOD_tools.c:1395
long file_number_lines(const char *file_name)
Definition: COREMOD_tools.c:1370
void quick_sort2l_double(double *array, long *array1, unsigned long count)
Definition: COREMOD_tools.c:1154
errno_t write_1D_array(double *array, long nbpoints, const char *filename)
Definition: COREMOD_tools.c:1425
void quick_sort3_float(float *array, float *array1, float *array2, unsigned long count)
Definition: COREMOD_tools.c:1132
void qs3(double *array, double *array1, double *array2, unsigned long left, unsigned long right)
Definition: COREMOD_tools.c:562
int read_config_parameter_exists(const char *config_file, const char *keyword)
Definition: COREMOD_tools.c:1240
void quick_sort3ulul_double(double *array, unsigned long *array1, unsigned long *array2, unsigned long count)
Definition: COREMOD_tools.c:1171
void qs_double(double *array, unsigned long left, unsigned long right)
Definition: COREMOD_tools.c:460