00001 #ifndef HOCKNEY_H_
00002 #define HOCKNEY_H_
00003
00004 #include "cpm_model.h"
00005 #include <stdio.h>
00006 #ifdef HAVE_CONFIG_H
00007 #include "MPIBlib/benchmarks/mpib_measurement.h"
00008 #else
00009 #include "mpib_measurement.h"
00010 #endif
00011
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026
00028 typedef struct Hockney_model {
00030 CPM_predictor predictor;
00032 int n;
00034 double* a;
00036 double* b;
00037 } Hockney_model;
00038
00043 Hockney_model* Hockney_alloc(int n);
00044
00049 void Hockney_free(Hockney_model* model);
00050
00052 void Hockney_read(FILE* stream, Hockney_model** model);
00053
00055 void Hockney_write(FILE* stream, const Hockney_model* model);
00056
00077 void Hockney_estimate(MPI_Comm comm, int M, MPIB_precision precision, int parallel, Hockney_model** model);
00078
00093 void Hockney_estimate_regression(MPI_Comm comm, MPIB_msgset msgset, MPIB_precision precision, int parallel, Hockney_model** model);
00094
00099 double Hockney_predict_p2p(void* _this, int i, int j, int M);
00100
00105 double Hockney_predict_sg_flat_serial(void* _this, int root, int M);
00106
00111 double Hockney_predict_sg_flat_parallel(void* _this, int root, int M);
00112
00118 double Hockney_predict_sg_binomial(void* _this, int root, int M);
00119
00124 double Hockney_hpredict_sg_flat_serial(void* _this, int M);
00125
00130 double Hockney_hpredict_sg_flat_parallel(void* _this, int M);
00131
00137 double Hockney_hpredict_sg_binomial(void* _this, int M);
00138
00146 void HHockney_estimate(MPI_Comm comm, MPIB_precision precision, MPIB_msgset msgset, Hockney_model** model);
00147
00149 double HHockney_predict_p2p(void* _this, int i, int j, int m);
00150
00152 double HHockney_predict_scatter_flat(void* _this, int root, int m, int n);
00153
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157
00161 #endif