OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ResultSetReductionOps.h File Reference
#include <Logger/Logger.h>
#include <memory>
#include <string>
#include <vector>
+ Include dependency graph for ResultSetReductionOps.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Value
 
class  Constant
 
class  ConstantInt
 
class  ConstantFP
 
class  Argument
 
class  Instruction
 
class  Function
 
struct  Function::NamedArg
 
class  GetElementPtr
 
class  Load
 
class  ICmp
 
class  BinaryOperator
 
class  Cast
 
class  Ret
 
class  Call
 
class  ExternalCall
 
class  Alloca
 
class  MemCpy
 
class  ReturnEarly
 
class  For
 

Enumerations

enum  Type {
  Type::Int1, Type::Int8, Type::Int32, Type::Int64,
  Type::Float, Type::Double, Type::Void, Type::Int8Ptr,
  Type::Int32Ptr, Type::Int64Ptr, Type::FloatPtr, Type::DoublePtr,
  Type::VoidPtr, Type::Int64PtrPtr
}
 

Functions

std::ostream & operator<< (std::ostream &os, const Type &type)
 
std::ostream & operator<< (std::ostream &os, const std::vector< Type > &types)
 
Type pointee_type (const Type pointer)
 
Type pointer_type (const Type pointee)
 

Variables

thread_local size_t g_value_id
 

Enumeration Type Documentation

enum Type
strong
Enumerator
Int1 
Int8 
Int32 
Int64 
Float 
Double 
Void 
Int8Ptr 
Int32Ptr 
Int64Ptr 
FloatPtr 
DoublePtr 
VoidPtr 
Int64PtrPtr 

Definition at line 33 of file ResultSetReductionOps.h.

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Type type 
)
inline

Definition at line 50 of file ResultSetReductionOps.h.

References Double, DoublePtr, Float, FloatPtr, Int1, Int32, Int32Ptr, Int64, Int64Ptr, Int64PtrPtr, Int8, Int8Ptr, Void, and VoidPtr.

50  {
51  switch (type) {
52  case Type::Int1: {
53  os << "Int1";
54  break;
55  }
56  case Type::Int8: {
57  os << "Int8";
58  break;
59  }
60  case Type::Int32: {
61  os << "Int32";
62  break;
63  }
64  case Type::Int64: {
65  os << "Int64";
66  break;
67  }
68  case Type::Float: {
69  os << "Float";
70  break;
71  }
72  case Type::Double: {
73  os << "Double";
74  break;
75  }
76  case Type::Void: {
77  os << "Void";
78  break;
79  }
80  case Type::Int8Ptr: {
81  os << "Int8Ptr";
82  break;
83  }
84  case Type::Int32Ptr: {
85  os << "Int32Ptr";
86  break;
87  }
88  case Type::Int64Ptr: {
89  os << "Int64Ptr";
90  break;
91  }
92  case Type::FloatPtr: {
93  os << "FloatPtr";
94  break;
95  }
96  case Type::DoublePtr: {
97  os << "DoublePtr";
98  break;
99  }
100  case Type::VoidPtr: {
101  os << "VoidPtr";
102  break;
103  }
104  case Type::Int64PtrPtr: {
105  os << "Int64PtrPtr";
106  break;
107  }
108  }
109  return os;
110 }
std::ostream& operator<< ( std::ostream &  os,
const std::vector< Type > &  types 
)
inline

Definition at line 112 of file ResultSetReductionOps.h.

References run_benchmark_import::type.

112  {
113  os << "(";
114  for (const Type& type : types) {
115  os << type << ", ";
116  }
117  os << ")";
118  return os;
119 }
Type pointee_type ( const Type  pointer)
inline

Definition at line 122 of file ResultSetReductionOps.h.

References Double, DoublePtr, logger::FATAL, Float, FloatPtr, Int32, Int32Ptr, Int64, Int64Ptr, Int64PtrPtr, Int8, Int8Ptr, LOG, and Void.

Referenced by anonymous_namespace{ResultSetReductionCodegen.cpp}::translate_body().

122  {
123  switch (pointer) {
124  case Type::Int8Ptr: {
125  return Type::Int8;
126  }
127  case Type::Int32Ptr: {
128  return Type::Int32;
129  }
130  case Type::Int64Ptr: {
131  return Type::Int64;
132  }
133  case Type::FloatPtr: {
134  return Type::Float;
135  }
136  case Type::DoublePtr: {
137  return Type::Double;
138  }
139  case Type::Int64PtrPtr: {
140  return Type::Int64Ptr;
141  }
142  default: {
143  LOG(FATAL) << "Invalid pointer type: " << static_cast<int>(pointer);
144  }
145  }
146  return Type::Void;
147 }
#define LOG(tag)
Definition: Logger.h:285

+ Here is the caller graph for this function:

Type pointer_type ( const Type  pointee)
inline

Definition at line 150 of file ResultSetReductionOps.h.

References logger::FATAL, Int64, Int64Ptr, Int64PtrPtr, Int8, Int8Ptr, LOG, and Void.

Referenced by anonymous_namespace{QueryTemplateGenerator.cpp}::get_pointer_element_type().

150  {
151  switch (pointee) {
152  case Type::Int8: {
153  return Type::Int8Ptr;
154  }
155  case Type::Int64: {
156  return Type::Int64Ptr;
157  }
158  case Type::Int64Ptr: {
159  return Type::Int64PtrPtr;
160  }
161  default: {
162  LOG(FATAL) << "Invalid pointee type: " << static_cast<int>(pointee);
163  }
164  }
165  return Type::Void;
166 }
#define LOG(tag)
Definition: Logger.h:285

+ Here is the caller graph for this function:

Variable Documentation

thread_local size_t g_value_id

Definition at line 20 of file ResultSetReductionInterpreter.cpp.

Referenced by Function::Function().