Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
replace some abs by fabs, to please freebsd
[simgrid.git] / examples / smpi / NAS / nas_common.h
1 /* Copyright (c) 2016. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef NAS_COMMON_H
7 #define NAS_COMMON_H
8
9 #include <stdlib.h>
10 #include <stdio.h>
11 #include <math.h>
12 #include "mpi.h"
13
14 enum benchmark_types {IS, DT, EP};
15
16 int ilog2(int i);
17 void timer_clear(int n);
18 void timer_start(int n);
19 void timer_stop(int n);
20 double timer_read(int n);
21
22 void time_clear(double *onetimer);
23 void time_start(double *onetimer);
24 void time_stop(int n,double *elapsed,double *start);
25 double time_read(int n, double *elapsed);
26
27 double vranlc(int n, double x, double a, double *y);
28 double randlc(double *X, double*A);
29
30 void c_print_results(const char *name, char class, int n1, int n2, int n3, int niter, int nprocs_compiled,
31                      int nprocs_total, double t, double mops, const char *optype, int passed_verification);
32
33 void get_info(int argc, char *argv[], int *nprocsp, char *classp);
34 void check_info(int type, int nprocs, char class);
35
36 #endif