Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of github.com:mquinson/simgrid
[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 <stdint.h>
12 #include <math.h>
13 #include "mpi.h"
14
15 enum benchmark_types {IS, DT, EP};
16
17 int ilog2(int i);
18 void timer_clear(int n);
19 void timer_start(int n);
20 void timer_stop(int n);
21 double timer_read(int n);
22
23 void time_clear(double *onetimer);
24 void time_start(double *onetimer);
25 void time_stop(int n,double *elapsed,double *start);
26 double time_read(int n, double *elapsed);
27
28 double vranlc(int n, double x, double a, double *y);
29 double randlc(double *X, double*A);
30
31 void c_print_results(const char *name, char class, int n1, int n2, int n3, int niter, int nprocs_compiled,
32                      int nprocs_total, double t, double mops, const char *optype, int passed_verification);
33
34 void get_info(int argc, char *argv[], int *nprocsp, char *classp);
35 void check_info(int type, int nprocs, char class);
36
37 #endif