Column-oriented GPU-accelerated Database Management System
CoGaDB
/home/sebastian/gpudbms/trunk/hype-library/include/hype.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <config/global_definitions.hpp>
#include <assert.h>
Include dependency graph for hype.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

Typedefs

typedef struct C_SchedulingDecision C_SchedulingDecision
typedef struct
C_AlgorithmSpecification 
C_AlgorithmSpecification
typedef struct
C_DeviceSpecification 
C_DeviceSpecification
typedef struct
C_OperatorSpecification 
C_OperatorSpecification
typedef struct C_DeviceConstraint 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_AlgorithmSpecificationhype_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_DeviceSpecificationhype_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_OperatorSpecificationhype_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_DeviceConstrainthype_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_SchedulingDecisionhype_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 ()

Typedef Documentation


Function Documentation

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.

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

Parameters:
alg_specdefines properties of the algorithm, e.g., name, the operation it belongs to, etc.
dev_specdefines properties of the processing device the algorithm runs on, e.g., device type (CPU or GPU) and the device id
Returns:
returns true on success and false otherwise
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.

Parameters:
sched_decthe scheduling decision, this observation belongs to
measured_execution_timemeasured execution time, in nanoseconds!!!
Returns:
true on success and false in case an error occured
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

Parameters:
operator_namethe operations's name
feature_vectorthe feature vector of this operator
feature_vector_lengththe feature vectors length
location_of_input_datathe memory id where the input data is stored
location_for_output_datathe memory id where the output data is stored
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

Parameters:
alg_namename of the algorithm
op_namename of the operation the algorithms belongs to
stat_meththe statistical method used for learning the algorithms behavior (optional)
recomp_heurthe recomputation heuristic used for adapting the algorithms approximation function (optional)
opt_critthe optimization criterion of the operation the algorithm belongs to (optional)

constructs an C_DeviceConstraint object by assigning necessary informations to all fields of the object

Parameters:
dev_constra device type constraint (e.g., CPU_ONLY or ANY_DEVICE for now restriction)
pd_mem_constrmemory id, where the data should be stored when processed (experimental)

constructs an C_DeviceSpecification object by assigning necessary informations to all fields of the object

Parameters:
pdthe unique id of the processing device
pd_ttype of the processing device (e.g., CPU or GPU)
pd_munique id of the memory the processing device uses
double hype_getEstimatedExecutionTime ( const C_OperatorSpecification op_spec,
const char *  alg_name 
)

Returns a Scheduling Decision, which contains the name of the estimated optimal Algorithm w.r.t. the user specified optimization criterion.

Parameters:
op_specOperatorSpecification, contains all available information about the operator to execute
dev_constrDeviceConstraint, restricting the available algorithms to a subset of the algorithm pool (e.g., allow only CPU algorithms)
Returns:
SchedulingDecision, which contains the suggested algortihm for the specified information
uint64_t hype_getTimestamp ( )
void hype_printStatus ( )
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

Parameters:
name_of_operationname of the Operation
name_of_optimization_criterionName of OptimizationCriterion
Returns:
returns true on success and false otherwise
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

Parameters:
name_of_algorithmName of Algorithm
name_of_recomputation_strategyassigns the RecomputationHeuristic name_of_recomputation_strategy to an existing Algorithm
Returns:
returns true on success and false otherwise
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

Parameters:
name_of_algorithmName of Algorithm
name_of_statistical_methodassigns the StatisticalMethod name_of_statistical_method to an existing Algorithm
Returns:
returns true on success and false otherwise
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines