Hybrid Query Processing Engine for Coprocessing in Database Systems
HyPE
|
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <config/global_definitions.hpp>
#include <assert.h>
Go to the source code of this file.
Classes | |
struct | C_SchedulingDecision |
struct | C_AlgorithmSpecification |
struct | C_DeviceSpecification |
struct | C_OperatorSpecification |
struct | C_DeviceConstraint |
Functions | |
char * | hype_SchedulingDecision_getAlgorithmName (C_SchedulingDecision *sched_dec) |
ProcessingDeviceID | hype_SchedulingDecision_getProcessingDeviceID (C_SchedulingDecision *sched_dec) |
int | hype_deleteSchedulingDecision (C_SchedulingDecision *sched_dec) |
C_AlgorithmSpecification * | hype_createAlgorithmSpecification (const char *alg_name, const char *op_name, StatisticalMethod stat_meth, RecomputationHeuristic recomp_heur, OptimizationCriterion opt_crit) |
constructs an C_AlgorithmSpecification object by assigning necessary informations to all fields of the object | |
int | hype_deleteAlgorithmSpecification (C_AlgorithmSpecification *alg_spec) |
C_DeviceSpecification * | hype_createDeviceSpecification (ProcessingDeviceID pd, ProcessingDeviceType pd_t, ProcessingDeviceMemoryID pd_m) |
constructs an C_DeviceSpecification object by assigning necessary informations to all fields of the object | |
int | hype_deleteDeviceSpecification (C_DeviceSpecification *dev_spec) |
C_OperatorSpecification * | hype_create_OperatorSpecification (const char *operator_name, double *feature_vector, size_t feature_vector_length, ProcessingDeviceMemoryID location_of_input_data, ProcessingDeviceMemoryID location_for_output_data) |
constructs an C_OperatorSpecification object by assigning necessary informations to all fields of the object | |
int | hype_deleteOperatorSpecification (C_OperatorSpecification *op_spec) |
C_DeviceConstraint * | hype_createDeviceConstraint (DeviceTypeConstraint dev_constr, ProcessingDeviceMemoryID pd_mem_constr) |
constructs an C_DeviceConstraint object by assigning necessary informations to all fields of the object | |
int | hype_deleteDeviceConstraint (C_DeviceConstraint *dev_const) |
int | hype_addAlgorithm (const C_AlgorithmSpecification *alg_spec, const C_DeviceSpecification *dev_spec) |
adds an Algorithm to the AlgorithmPool of an operation defined by alg_spec on the processing device defined by dev_spec. | |
int | hype_setOptimizationCriterion (const char *name_of_operation, const char *name_of_optimization_criterion) |
assigns the OptimizationCriterion name_of_optimization_criterion to Operation name_of_operation | |
int | hype_setStatisticalMethod (const char *name_of_algorithm, const char *name_of_statistical_method) |
assigns the StatisticalMethod name_of_statistical_method to an existing Algorithm | |
int | hype_setRecomputationHeuristic (const char *name_of_algorithm, const char *name_of_recomputation_strategy) |
assigns the StatisticalMethod name_of_statistical_method to an existing Algorithm | |
C_SchedulingDecision * | hype_getOptimalAlgorithm (const C_OperatorSpecification *op_spec, const C_DeviceConstraint *dev_constr) |
Returns a Scheduling Decision, which contains the name of the estimated optimal Algorithm w.r.t. the user specified optimization criterion. | |
int | hype_addObservation (const C_SchedulingDecision *sched_dec, const double measured_execution_time) |
adds an observed execution time to the algorithm previously choosen by getOptimalAlgorithmName. | |
double | hype_getEstimatedExecutionTime (const C_OperatorSpecification *op_spec, const char *alg_name) |
uint64_t | hype_getTimestamp () |
void | hype_printStatus () |
int hype_addAlgorithm | ( | const C_AlgorithmSpecification * | alg_spec, |
const C_DeviceSpecification * | dev_spec | ||
) |
If the specified operation does not exist, it is created. Multiple calls to addAlgorithm with an AlgorithmSpecification having the same Operation name will add the respective algorithms to the algorithm pool of the specified Operation
alg_spec | defines properties of the algorithm, e.g., name, the operation it belongs to, etc. |
dev_spec | defines properties of the processing device the algorithm runs on, e.g., device type (CPU or GPU) and the device id |
Definition at line 163 of file c_interface.cpp.
References hype::Scheduler::instance(), C_AlgorithmSpecification::ptr, and C_DeviceSpecification::ptr.
Referenced by main().
int hype_addObservation | ( | const C_SchedulingDecision * | sched_dec, |
const double | measured_execution_time | ||
) |
sched_dec | the scheduling decision, this observation belongs to |
measured_execution_time | measured execution time, in nanoseconds!!! |
Definition at line 211 of file c_interface.cpp.
References hype::Scheduler::instance(), and C_SchedulingDecision::ptr.
Referenced by main().
C_OperatorSpecification* hype_create_OperatorSpecification | ( | const char * | operator_name, |
double * | feature_vector, | ||
size_t | feature_vector_length, | ||
ProcessingDeviceMemoryID | location_of_input_data, | ||
ProcessingDeviceMemoryID | location_for_output_data | ||
) |
operator_name | the operations's name |
feature_vector | the feature vector of this operator |
feature_vector_length | the feature vectors length |
location_of_input_data | the memory id where the input data is stored |
location_for_output_data | the memory id where the output data is stored |
Definition at line 114 of file c_interface.cpp.
References C_OperatorSpecification::ptr.
Referenced by main().
C_AlgorithmSpecification* hype_createAlgorithmSpecification | ( | const char * | alg_name, |
const char * | op_name, | ||
StatisticalMethod | stat_meth, | ||
RecomputationHeuristic | recomp_heur, | ||
OptimizationCriterion | opt_crit | ||
) |
alg_name | name of the algorithm |
op_name | name of the operation the algorithms belongs to |
stat_meth | the statistical method used for learning the algorithms behavior (optional) |
recomp_heur | the recomputation heuristic used for adapting the algorithms approximation function (optional) |
opt_crit | the optimization criterion of the operation the algorithm belongs to (optional) |
Definition at line 65 of file c_interface.cpp.
References C_AlgorithmSpecification::ptr.
Referenced by main().
C_DeviceConstraint* hype_createDeviceConstraint | ( | DeviceTypeConstraint | dev_constr, |
ProcessingDeviceMemoryID | pd_mem_constr | ||
) |
dev_constr | a device type constraint (e.g., CPU_ONLY or ANY_DEVICE for now restriction) |
pd_mem_constr | memory id, where the data should be stored when processed (experimental) |
Definition at line 140 of file c_interface.cpp.
References C_DeviceConstraint::ptr.
Referenced by main().
C_DeviceSpecification* hype_createDeviceSpecification | ( | ProcessingDeviceID | pd, |
ProcessingDeviceType | pd_t, | ||
ProcessingDeviceMemoryID | pd_m | ||
) |
pd | the unique id of the processing device |
pd_t | type of the processing device (e.g., CPU or GPU) |
pd_m | unique id of the memory the processing device uses |
Definition at line 90 of file c_interface.cpp.
References C_DeviceSpecification::ptr.
Referenced by main().
int hype_deleteAlgorithmSpecification | ( | C_AlgorithmSpecification * | alg_spec | ) |
Definition at line 77 of file c_interface.cpp.
References C_AlgorithmSpecification::ptr.
Referenced by main().
int hype_deleteDeviceConstraint | ( | C_DeviceConstraint * | dev_const | ) |
Definition at line 148 of file c_interface.cpp.
References C_DeviceConstraint::ptr.
Referenced by main().
int hype_deleteDeviceSpecification | ( | C_DeviceSpecification * | dev_spec | ) |
Definition at line 100 of file c_interface.cpp.
References C_DeviceSpecification::ptr.
Referenced by main().
int hype_deleteOperatorSpecification | ( | C_OperatorSpecification * | op_spec | ) |
Definition at line 125 of file c_interface.cpp.
References C_OperatorSpecification::ptr.
Referenced by main().
int hype_deleteSchedulingDecision | ( | C_SchedulingDecision * | sched_dec | ) |
Definition at line 52 of file c_interface.cpp.
References C_SchedulingDecision::ptr.
Referenced by main().
double hype_getEstimatedExecutionTime | ( | const C_OperatorSpecification * | op_spec, |
const char * | alg_name | ||
) |
Definition at line 219 of file c_interface.cpp.
References hype::Scheduler::getEstimatedExecutionTime(), hype::core::EstimatedTime::getTimeinNanoseconds(), hype::Scheduler::instance(), and C_OperatorSpecification::ptr.
C_SchedulingDecision* hype_getOptimalAlgorithm | ( | const C_OperatorSpecification * | op_spec, |
const C_DeviceConstraint * | dev_constr | ||
) |
op_spec | OperatorSpecification, contains all available information about the operator to execute |
dev_constr | DeviceConstraint, restricting the available algorithms to a subset of the algorithm pool (e.g., allow only CPU algorithms) |
Definition at line 196 of file c_interface.cpp.
References hype::Scheduler::getOptimalAlgorithm(), hype::Scheduler::instance(), C_SchedulingDecision::ptr, C_OperatorSpecification::ptr, and C_DeviceConstraint::ptr.
Referenced by main().
uint64_t hype_getTimestamp | ( | ) |
Definition at line 230 of file c_interface.cpp.
References getTimestamp().
Referenced by main().
void hype_printStatus | ( | ) |
Definition at line 234 of file c_interface.cpp.
References hype::core::Scheduler::instance(), and hype::core::Scheduler::print().
Referenced by main().
char* hype_SchedulingDecision_getAlgorithmName | ( | C_SchedulingDecision * | sched_dec | ) |
Definition at line 34 of file c_interface.cpp.
References hype::core::SchedulingDecision::getNameofChoosenAlgorithm(), and C_SchedulingDecision::ptr.
ProcessingDeviceID hype_SchedulingDecision_getProcessingDeviceID | ( | C_SchedulingDecision * | sched_dec | ) |
Definition at line 45 of file c_interface.cpp.
References hype::core::SchedulingDecision::getDeviceSpecification(), hype::core::DeviceSpecification::getProcessingDeviceID(), PD0, and C_SchedulingDecision::ptr.
int hype_setOptimizationCriterion | ( | const char * | name_of_operation, |
const char * | name_of_optimization_criterion | ||
) |
name_of_operation | name of the Operation |
name_of_optimization_criterion | Name of OptimizationCriterion |
Definition at line 173 of file c_interface.cpp.
References hype::Scheduler::instance().
int hype_setRecomputationHeuristic | ( | const char * | name_of_algorithm, |
const char * | name_of_recomputation_strategy | ||
) |
name_of_algorithm | Name of Algorithm |
name_of_recomputation_strategy | assigns the RecomputationHeuristic name_of_recomputation_strategy to an existing Algorithm |
Definition at line 187 of file c_interface.cpp.
References hype::Scheduler::instance().
int hype_setStatisticalMethod | ( | const char * | name_of_algorithm, |
const char * | name_of_statistical_method | ||
) |
name_of_algorithm | Name of Algorithm |
name_of_statistical_method | assigns the StatisticalMethod name_of_statistical_method to an existing Algorithm |
Definition at line 180 of file c_interface.cpp.
References hype::Scheduler::instance().