OmniSciDB  471d68cefb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{ResultSetReductionInterpreter.cpp} Namespace Reference

Functions

std::vector< Typeget_value_types (const std::vector< const Value * > &values)
 
size_t get_element_size (const Type element_type)
 
ReductionInterpreter::EvalValue eval_constant (const Constant *constant)
 

Function Documentation

ReductionInterpreter::EvalValue anonymous_namespace{ResultSetReductionInterpreter.cpp}::eval_constant ( const Constant constant)

Definition at line 405 of file ResultSetReductionInterpreter.cpp.

References Double, logger::FATAL, Float, Int32, Int64, Int8, LOG, ReductionInterpreter::MakeEvalValue(), and Value::type().

405  {
406  switch (constant->type()) {
407  case Type::Int8:
408  case Type::Int32:
409  case Type::Int64: {
411  static_cast<const ConstantInt*>(constant)->value());
412  }
413  case Type::Float: {
415  static_cast<float>(static_cast<const ConstantFP*>(constant)->value()));
416  }
417  case Type::Double: {
419  static_cast<const ConstantFP*>(constant)->value());
420  }
421  default: {
422  LOG(FATAL) << "Constant type not supported: " << static_cast<int>(constant->type());
423  break;
424  }
425  }
426  return {};
427 }
#define LOG(tag)
Definition: Logger.h:203
Type type() const
static EvalValue MakeEvalValue(const T &val)

+ Here is the call graph for this function:

size_t anonymous_namespace{ResultSetReductionInterpreter.cpp}::get_element_size ( const Type  element_type)

Definition at line 36 of file ResultSetReductionInterpreter.cpp.

References logger::FATAL, Int64PtrPtr, Int8Ptr, and LOG.

Referenced by Fragmenter_Namespace::InsertOrderFragmenter::compactRows(), anonymous_namespace{TypedDataAccessors.h}::put_scalar(), ReductionInterpreterImpl::runAlloca(), ReductionInterpreterImpl::runGetElementPtr(), anonymous_namespace{TypedDataAccessors.h}::set_string_index(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), and Fragmenter_Namespace::InsertOrderFragmenter::vacuum_fixlen_rows().

36  {
37  switch (element_type) {
38  case Type::Int8Ptr: {
39  return sizeof(int8_t);
40  }
41  case Type::Int64PtrPtr: {
42  return sizeof(int64_t*);
43  }
44  default: {
45  LOG(FATAL) << "Base pointer type not supported: " << static_cast<int>(element_type);
46  break;
47  }
48  }
49  return 0;
50 }
#define LOG(tag)
Definition: Logger.h:203

+ Here is the caller graph for this function:

std::vector<Type> anonymous_namespace{ResultSetReductionInterpreter.cpp}::get_value_types ( const std::vector< const Value * > &  values)

Definition at line 25 of file ResultSetReductionInterpreter.cpp.

Referenced by ReductionInterpreterImpl::bindStub(), and ReductionInterpreterImpl::runExternalCall().

25  {
26  std::vector<Type> value_types;
27  value_types.reserve(value_types.size());
28  std::transform(values.begin(),
29  values.end(),
30  std::back_inserter(value_types),
31  [](const Value* value) { return value->type(); });
32  return value_types;
33 }

+ Here is the caller graph for this function: