00001 #ifndef FUPERMOD_MODEL_H_
00002 #define FUPERMOD_MODEL_H_
00003
00004 #include "fupermod_data.h"
00005
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009
00032 typedef struct fupermod_model {
00034 fupermod_data* data;
00036 fupermod_complexity complexity;
00038 long long int D;
00040 double (*t)(struct fupermod_model* model, double x);
00042 double (*dt)(struct fupermod_model* model, double x);
00044 int (*update)(struct fupermod_model* model, fupermod_point point);
00046 void* params;
00047 } fupermod_model;
00048
00050 typedef fupermod_model* (*fupermod_model_alloc)(fupermod_data* data, fupermod_complexity complexity, long long int D, void* params, int);
00052 typedef void (*fupermod_model_free)(fupermod_model* model);
00053
00055 double fupermod_model_speed(fupermod_model* model, long long int d);
00056
00058 void fupermod_print_model(FILE* stream, fupermod_library* library, fupermod_process_conf conf, fupermod_model* model, long long int D);
00059
00060
00061 void fupermod_print_models_data(FILE* stream, const int size, fupermod_model** models);
00062
00072 fupermod_model* fupermod_model_constant_alloc(fupermod_data* data, fupermod_complexity complexity, long long int D, void* params, int smooth);
00073
00075 void fupermod_model_constant_free(fupermod_model* model);
00076
00086 fupermod_model* fupermod_model_constant_interp_alloc(fupermod_data* data, fupermod_complexity complexity, long long int D, void* params, int bench_size);
00087
00089 void fupermod_model_constant_interp_free(fupermod_model* model);
00090
00099 fupermod_model* fupermod_model_piecewise_alloc(fupermod_data* data, fupermod_complexity complexity, long long int D, void* params, int smooth);
00100
00102 void fupermod_model_piecewise_free(fupermod_model* model);
00103
00105 void fupermod_print_models_piecewise(FILE* stream, int size, fupermod_model** models, long long int D);
00106
00117 fupermod_model* fupermod_model_interp_alloc(fupermod_data* data, fupermod_complexity complexity, long long int D, void* params, int smooth);
00118
00120 void fupermod_model_interp_free(fupermod_model* model);
00121
00128 char* fupermod_model_filename(const char* path, fupermod_process_conf conf);
00129
00133 #ifdef __cplusplus
00134 }
00135 #endif
00136
00137 #endif