source: soft/giet_vm/applications/rosenfeld/include/util.h @ 808

Last change on this file since 808 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++")
15extern "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
22uint32 i32log2(uint32 x);
23   
24uint8 ui8rand(void);
25uint32 ui32rand(void);
26float32 f32rand(void);
27
28void rand_ui8vector(uint8 *X, int i0, int i1);
29void rand_ui32vector(uint32 *X, int i0, int i1);
30void rand_f32vector(float32 *X, int i0, int i1);
31
32int getIter(int size);
33int getIterAV(int size);
34
35float32 gauss(float32 sigma, float32 x);
36double cpp(double t, int n);
37
38void 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.