linear_reg.h 847 Bytes
Newer Older
1
2
3
#ifndef LINEAR_REG_H
#define LINEAR_REG_H

4
5
6
7
#include <stdlib.h>
#include <stdio.h>
#include <mpi.h>

8
9
10
11
12
13
14
/*----------LINEAR REGRESSION TYPES--------------*/
#define LR_ARRAY_TAM 11
// Array for linear regression computation
extern double LR_bytes_array[LR_ARRAY_TAM];

void lr_calc_Y(double slope, double intercept, double x_value, int *y_result);
void lr_compute(int loop_iters, double *bytes, double *times, double *slope, double *intercept);
15

16
void lr_times_bcast(int myId, int numP, int root, MPI_Comm comm, int loop_iters, double *times);
17
18
19
void lr_times_allgatherv(int myId, int numP, int root, MPI_Comm comm, int loop_iters, double *times);
void lr_times_reduce(int myId, int numP, int root, MPI_Comm comm, int loop_iters, double *times);
void lr_times_allreduce(int myId, int numP, int root, MPI_Comm comm, int loop_iters, double *times);
20

21
#endif