source: soft/giet_vm/applications/rosenfeld/include/mutil.h @ 772

Last change on this file since 772 was 772, checked in by meunier, 8 years ago
  • Ajout de l'application rosenfeld
  • Changement du nom du flag O_CREATE en O_CREAT
File size: 1.6 KB
Line 
1/* --------------- */
2/* --- mutil.h --- */
3/* --------------- */
4
5#ifndef __MUTIL_H__
6#define __MUTIL_H__
7
8#ifdef __cplusplus
9#pragma message ("C++")
10extern "C" {
11#endif
12
13#define RUN 5
14#define FREQ 2.4e9
15
16//#define CHRONO(X,t) 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; } t = tmin*FREQ/(iter*n*n)
17    #define CHRONO(X,t) 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; } t = tmin/iter
18//#define CHRONO(X,t) 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; } t=tmin/iter
19
20float32 forceCalc(float32 **X, int i0, int i1, int j0, int j1);
21
22double cpp(double t, int n);
23
24double cp0DotProduct  (double t, int n);
25double cp0Euclide     (double t, int n);
26double cp0Manhattan   (double t, int n);
27double cp0Mahalanobis (double t, int n);
28
29double mflopsDotProduct (double t, int n);
30double mflopsEuclide    (double t, int n);
31double mflopsManhattan  (double t, int n);
32double mflopsMahalanobis(double t, int n);
33double mflopsMul        (double t, int n);
34
35uint8 ui8rand(void);
36uint32 ui32rand(void);
37uint32 f32rand(void);
38
39void rand_ui8vector(uint8 *X, int i0, int i1);
40void rand_ui32vector(uint32 *X, int i0, int i1);
41void rand_f32vector(float32 *X, int i0, int i1);
42
43int getIter(int size);
44int getIterAV(int size);
45
46float32 gauss(float32 sigma, float32 x);
47
48
49#ifdef __cplusplus
50}
51#endif
52
53#endif /* __MUTIL_H__ */
Note: See TracBrowser for help on using the repository browser.