OmniSciDB  a5dc49c757
 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 414 of file ResultSetReductionInterpreter.cpp.

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

414  {
415  switch (constant->type()) {
416  case Type::Int8:
417  case Type::Int32:
418  case Type::Int64: {
420  static_cast<const ConstantInt*>(constant)->value());
421  }
422  case Type::Float: {
424  static_cast<float>(static_cast<const ConstantFP*>(constant)->value()));
425  }
426  case Type::Double: {
428  static_cast<const ConstantFP*>(constant)->value());
429  }
430  default: {
431  LOG(FATAL) << "Constant type not supported: " << static_cast<int>(constant->type());
432  break;
433  }
434  }
435  return {};
436 }
#define LOG(tag)
Definition: Logger.h:285
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:285

+ 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.

References shared::transform().

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 }
OUTPUT transform(INPUT const &input, FUNC const &func)
Definition: misc.h:329

+ Here is the call graph for this function:

+ Here is the caller graph for this function: