Column-oriented GPU-accelerated Database Management System
CoGaDB
/home/sebastian/gpudbms/trunk/cogadb/include/core/global_definitions.hpp
Go to the documentation of this file.
00001 
00002 #pragma once
00003 
00004 #ifdef HAVE_CONFIG_H
00005 #include "config.h"
00006 #endif
00007 
00008 #include <vector>
00009 #include <list>
00010 #include <map>
00011 #include <string>
00012 #include <boost/any.hpp>
00013 
00014 #include <boost/shared_ptr.hpp>
00015 
00016 //Compile Time configuration
00017 #define ENABLE_GPU_ACCELERATION
00018 #define ENABLE_TWO_PHASE_PHYSICAL_OPTIMIZATION
00019 
00020 #ifndef HYPE_ENABLE_PARALLEL_QUERY_PLAN_EVALUATION
00021         #define HYPE_ENABLE_PARALLEL_QUERY_PLAN_EVALUATION
00022 #endif
00023 
00024 #define COGADB_WARNING(X, Y)  std::cout << "WARNING: " << X << ": In " <<  __PRETTY_FUNCTION__ << std::endl;\
00025 std::cout << "In File: " << __FILE__ << " Line: " << __LINE__ << std::endl;
00026 
00027 #define COGADB_ERROR(X, Y)  std::cout << "ERROR: " << X << ": In " << __PRETTY_FUNCTION__ << std::endl;\
00028 std::cout << "In File: " << __FILE__ << " Line: " << __LINE__ << std::endl;
00029 
00030 #define COGADB_FATAL_ERROR(X, Y)  std::cout << "FATAL ERROR: " << X << ": In " << __PRETTY_FUNCTION__ << std::endl;\
00031 std::cout << "In File: " << __FILE__ << " Line: " << __LINE__ << std::endl;\
00032 std::cout << "Aborting Execution..." << std::endl;\
00033 exit(-1);
00034 
00035 
00036 namespace shared_pointer_namespace = boost; //std::tr1
00037 
00038 namespace CoGaDB{
00039 
00040 enum AttributeType{INT,FLOAT,VARCHAR,BOOLEAN};
00041 
00042 enum ComputeDevice{CPU,GPU};
00043 
00044 enum AggregationMethod{SUM,MIN,MAX};
00045 
00046 enum ValueComparator{LESSER,GREATER,EQUAL,LESSER_EQUAL,GREATER_EQUAL};
00047 
00048 enum PredicateType {ValueValuePredicate, ValueConstantPredicate};
00049 
00050 enum SortOrder{ASCENDING,DESCENDING};
00051 
00052 enum Operation{SELECTION,PROJECTION,JOIN,GROUPBY,SORT,COPY,AGGREGATION,FULL_SCAN,INDEX_SCAN};
00053 
00054 enum JoinAlgorithm{SORT_MERGE_JOIN,SORT_MERGE_JOIN_2,NESTED_LOOP_JOIN,HASH_JOIN};
00055 
00056 enum MaterializationStatus{MATERIALIZE,LOOKUP};
00057 
00058 enum ParallelizationMode{SERIAL,PARALLEL};
00059 
00060 enum ColumnAlgebraOperation{ADD,SUB,MUL,DIV};
00061 
00062 enum PositionListOperation{POSITIONLIST_INTERSECTION,POSITIONLIST_UNION};
00063 
00064 enum DebugMode{quiet=1,
00065                                         verbose=0,
00066                                         debug=0,
00067                                         print_time_measurement=0};
00068 
00069 /*
00070 enum DebugMode{quiet=0,
00071                                         verbose=1,
00072                                         debug=0,
00073                                         print_time_measurement=0};
00074 */
00075 typedef unsigned int TID;
00076 
00077 typedef std::pair<TID,TID> TID_Pair;
00078 
00079 typedef std::pair<AttributeType,std::string> Attribut;
00080 
00081 typedef std::list<Attribut> TableSchema;
00082 
00083 typedef std::vector<boost::any> Tuple;
00084 
00085 typedef std::pair<std::string,AggregationMethod> ColumnAggregation;
00086 
00087 //struct Attribut {
00088 
00089 //      AttributeType type_;
00090 //      std::string name_;
00091 //      ColumnPtr column_;
00092 
00093 //      AttributeType& first;
00094 //      std::string& second;
00095 
00096 //}
00097 }; //end namespace CogaDB
00098 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines