Class ReductionInterpreterImpl

class ReductionInterpreterImpl

Public Functions

ReductionInterpreterImpl(const size_t executor_id, const std::vector<ReductionInterpreter::EvalValue> &vars)
std::optional<ReductionInterpreter::EvalValue> ret() const
size_t getExecutorId() const

Public Static Functions

static void runGetElementPtr(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
static void runLoad(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
static void runICmp(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
static void runBinaryOperator(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
static void runCast(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
static void runRet(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
static void runCall(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
static void runExternalCall(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
static void runAlloca(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
static void runMemCpy(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
static void runReturnEarly(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
static void runFor(const Instruction *instruction, ReductionInterpreterImpl *interpreter)

Private Functions

void setVar(const Value *var, ReductionInterpreter::EvalValue value)

Private Members

size_t executor_id_
std::vector<ReductionInterpreter::EvalValue> vars_
std::vector<std::vector<int8_t>> alloca_buffers_
std::optional<ReductionInterpreter::EvalValue> ret_ = std::nullopt

Private Static Functions

template<class Call>
static std::vector<ReductionInterpreter::EvalValue> getCallInputs(const Call *call, const ReductionInterpreterImpl *interpreter)
template<class Call>
static StubGenerator::Stub bindStub(const size_t executor_id, const Call *call)