Last change
on this file since 827 was
772,
checked in by meunier, 9 years ago
|
- Ajout de l'application rosenfeld
- Changement du nom du flag O_CREATE en O_CREAT
|
File size:
892 bytes
|
Line | |
---|
1 | /* ------------- */ |
---|
2 | /* --- uti.h --- */ |
---|
3 | /* ------------- */ |
---|
4 | |
---|
5 | #ifndef __UTIL_H__ |
---|
6 | #define __UTIL_H__ |
---|
7 | |
---|
8 | //#include "def.h" |
---|
9 | //#include <stdio.h> |
---|
10 | //#include <stdlib.h> |
---|
11 | //#include "ecc_features.h" |
---|
12 | |
---|
13 | #ifdef __cplusplus |
---|
14 | #pragma message ("C++") |
---|
15 | extern "C" { |
---|
16 | #endif |
---|
17 | |
---|
18 | #define FREQ 2.4e9 |
---|
19 | |
---|
20 | #define CHRONO(X,dt) tmin = 1e10; for(r=0; r<run; r++) { t0 = chrono(); for(i=0;i<iter;i++) X; t1 = chrono(); dt = t1-t0; if(dt<tmin) tmin = dt; } dt = dt*FREQ/(iter*n) |
---|
21 | |
---|
22 | uint32 i32log2(uint32 x); |
---|
23 | |
---|
24 | uint8 ui8rand(void); |
---|
25 | uint32 ui32rand(void); |
---|
26 | float32 f32rand(void); |
---|
27 | |
---|
28 | void rand_ui8vector(uint8 *X, int i0, int i1); |
---|
29 | void rand_ui32vector(uint32 *X, int i0, int i1); |
---|
30 | void rand_f32vector(float32 *X, int i0, int i1); |
---|
31 | |
---|
32 | int getIter(int size); |
---|
33 | int getIterAV(int size); |
---|
34 | |
---|
35 | float32 gauss(float32 sigma, float32 x); |
---|
36 | double cpp(double t, int n); |
---|
37 | |
---|
38 | void printf_split(double x); |
---|
39 | #ifdef __cplusplus |
---|
40 | } |
---|
41 | #endif |
---|
42 | |
---|
43 | #endif /* __TRI_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.