OmniSciDB  dfae7c3b14
For Class Reference

#include <ResultSetReductionOps.h>

+ Inheritance diagram for For:
+ Collaboration diagram for For:

Public Member Functions

 For (const Value *start, const Value *end, const std::string &label)
 
const std::vector< std::unique_ptr< Instruction > > & body () const
 
const Valuestart () const
 
const Valueend () const
 
const Valueiter () const
 
void run (ReductionInterpreterImpl *interpreter) override
 
template<typename Tp , typename... Args>
Valueadd (Args &&... args)
 
- Public Member Functions inherited from Instruction
 Instruction (const Type type, const std::string &label)
 
- Public Member Functions inherited from Value
 Value (const Type type, const std::string &label)
 
Type type () const
 
size_t id () const
 
const std::string & label () const
 
virtual ~Value ()=default
 

Private Attributes

std::vector< std::unique_ptr< Instruction > > body_
 
const Valuestart_
 
const Valueend_
 
const Value iter_
 

Detailed Description

Definition at line 475 of file ResultSetReductionOps.h.

Constructor & Destructor Documentation

◆ For()

For::For ( const Value start,
const Value end,
const std::string &  label 
)
inline

Definition at line 477 of file ResultSetReductionOps.h.

479  , start_(start)
480  , end_(end)
481  , iter_(Type::Int64, label) {}
Instruction(const Type type, const std::string &label)
const Value * end_
const Value * start_
const Value iter_
const std::string & label() const

Member Function Documentation

◆ add()

template<typename Tp , typename... Args>
Value* For::add ( Args &&...  args)
inline

Definition at line 494 of file ResultSetReductionOps.h.

References run_benchmark_import::args.

Referenced by anonymous_namespace{ResultSetReductionJIT.cpp}::generate_loop_body().

494  {
495  body_.emplace_back(new Tp(std::forward<Args>(args)...));
496  return body_.back().get();
497  }
std::vector< std::unique_ptr< Instruction > > body_
+ Here is the caller graph for this function:

◆ body()

const std::vector<std::unique_ptr<Instruction> >& For::body ( ) const
inline

Definition at line 483 of file ResultSetReductionOps.h.

483 { return body_; }
std::vector< std::unique_ptr< Instruction > > body_

◆ end()

const Value* For::end ( ) const
inline

Definition at line 487 of file ResultSetReductionOps.h.

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

487 { return end_; }
const Value * end_
+ Here is the caller graph for this function:

◆ iter()

const Value* For::iter ( ) const
inline

Definition at line 489 of file ResultSetReductionOps.h.

References run.

Referenced by anonymous_namespace{ResultSetReductionJIT.cpp}::generate_loop_body().

489 { return &iter_; }
const Value iter_
+ Here is the caller graph for this function:

◆ run()

void For::run ( ReductionInterpreterImpl interpreter)
overridevirtual

Implements Instruction.

Definition at line 402 of file ResultSetReductionInterpreter.cpp.

References ReductionInterpreterImpl::runFor().

402  {
403  ReductionInterpreterImpl::runFor(this, interpreter);
404 }
static void runFor(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
+ Here is the call graph for this function:

◆ start()

const Value* For::start ( ) const
inline

Definition at line 485 of file ResultSetReductionOps.h.

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

485 { return start_; }
const Value * start_
+ Here is the caller graph for this function:

Member Data Documentation

◆ body_

std::vector<std::unique_ptr<Instruction> > For::body_
private

Definition at line 500 of file ResultSetReductionOps.h.

◆ end_

const Value* For::end_
private

Definition at line 502 of file ResultSetReductionOps.h.

◆ iter_

const Value For::iter_
private

Definition at line 506 of file ResultSetReductionOps.h.

◆ start_

const Value* For::start_
private

Definition at line 501 of file ResultSetReductionOps.h.


The documentation for this class was generated from the following files: