9 #ifndef TALVOS_INVOCATION_H
10 #define TALVOS_INVOCATION_H
54 const std::vector<Object> &InitialObjects,
244 template <
typename OpTy,
unsigned N,
unsigned Offset = 2,
typename F>
246 template <
unsigned N,
unsigned Offset = 2,
typename F>
248 template <
unsigned N,
unsigned Offset = 2,
typename F>
250 template <
unsigned N,
unsigned Offset = 2,
typename F>
void executeOpUInt(const Instruction *Inst, const F &&Op)
void executeSLessThanEqual(const Instruction *Inst)
void executeImageWrite(const Instruction *Inst)
std::vector< std::pair< uint32_t, Object > > PhiTemps
Temporary OpPhi results to be applied when we reach first non-OpPhi.
void executeCompositeConstruct(const Instruction *Inst)
void executeUndef(const Instruction *Inst)
void executeFRem(const Instruction *Inst)
void executePhi(const Instruction *Inst)
void executeIsInf(const Instruction *Inst)
uint32_t PreviousBlock
The previous block (for OpPhi).
std::vector< StackEntry > CallStack
The function call stack.
std::vector< uint64_t > Allocations
Function scope allocations within this stack frame.
void executeExtInst(const Instruction *Inst)
void executeFAdd(const Instruction *Inst)
void executeOpSInt(const Instruction *Inst, const F &&Op)
A data structure holding information for a function call.
void executeVariable(const Instruction *Inst)
void executeULessThan(const Instruction *Inst)
State getState() const
Returns the state of this invocation.
bool Discarded
True when fragment was discarded.
void step()
Step this invocation by executing the next instruction.
void executeCopyObject(const Instruction *Inst)
void executeCompositeInsert(const Instruction *Inst)
void executeULessThanEqual(const Instruction *Inst)
void executeImageQuerySize(const Instruction *Inst)
void executeUMod(const Instruction *Inst)
void executeConvertUToF(const Instruction *Inst)
void executeShiftRightArithmetic(const Instruction *Inst)
void executeINotEqual(const Instruction *Inst)
Memory * PrivateMemory
The private memory instance.
Device & Dev
The device this invocation is executing on.
void executeAtomicOp(const Instruction *Inst)
void executeIsNan(const Instruction *Inst)
void executeFUnordGreaterThan(const Instruction *Inst)
void executeAll(const Instruction *Inst)
void executeFOrdLessThanEqual(const Instruction *Inst)
This class represents a function in a SPIR-V Module.
void executeKill(const Instruction *Inst)
void executeUDiv(const Instruction *Inst)
void executeAccessChain(const Instruction *Inst)
void executeMatrixTimesScalar(const Instruction *Inst)
void executeFDiv(const Instruction *Inst)
~Invocation()
Destroy this invocation.
void executeReturn(const Instruction *Inst)
void executeFSub(const Instruction *Inst)
const Instruction * CallInst
The calling instruction.
Dim3 GlobalId
The GlobalInvocationID.
void executeFOrdNotEqual(const Instruction *Inst)
void executeSMod(const Instruction *Inst)
void executeSelect(const Instruction *Inst)
Invocation(Device &Dev, const std::vector< Object > &InitialObjects)
Create a standalone invocation for a device, with an initial set of result objects.
void executeBitwiseXor(const Instruction *Inst)
std::shared_ptr< const Module > CurrentModule
The current module.
void executeUConvert(const Instruction *Inst)
void executeIAdd(const Instruction *Inst)
void executeUGreaterThanEqual(const Instruction *Inst)
Invocation & operator=(const Invocation &)=delete
void executeShiftLeftLogical(const Instruction *Inst)
This class represents a single execution of a SPIR-V entry point.
void executeAtomicCompareExchange(const Instruction *Inst)
void executeImageSampleExplicitLod(const Instruction *Inst)
void executeNot(const Instruction *Inst)
void executeBitcast(const Instruction *Inst)
void executeOp(const Instruction *Inst, const F &Op)
Helper functions to execute simple instructions that can either operate on scalars or component-wise ...
void executeFOrdLessThan(const Instruction *Inst)
void executeFUnordNotEqual(const Instruction *Inst)
void executeSampledImage(const Instruction *Inst)
const Function * CallFunc
The function containing CallInst.
Class representing a 3-dimensional size or ID.
State
Used to indicate whether an invocation is ready to execute, waiting at a barrier, or complete...
void executeFMul(const Instruction *Inst)
void execute(const Instruction *Inst)
Execute Inst in this invocation.
void executeConvertSToF(const Instruction *Inst)
void executeIEqual(const Instruction *Inst)
void executeFUnordLessThan(const Instruction *Inst)
void executeCompositeExtract(const Instruction *Inst)
void executeStore(const Instruction *Inst)
This file declares the Dim3 class.
This class represents an address space in the virtual device.
void executeSDiv(const Instruction *Inst)
void executeVectorTimesMatrix(const Instruction *Inst)
void executeISub(const Instruction *Inst)
void executeSGreaterThanEqual(const Instruction *Inst)
void executeOpFP(const Instruction *Inst, const F &&Op)
void executeLogicalEqual(const Instruction *Inst)
bool wasDiscarded() const
Returns true if this invocation has been discarded with OpKill.
const Instruction * CurrentInstruction
The current instruction.
A Device instance encapsulates properties and state for the virtual device.
void executeVectorShuffle(const Instruction *Inst)
This file declares the Object class.
void executeLogicalNotEqual(const Instruction *Inst)
void executeLogicalAnd(const Instruction *Inst)
void executeAny(const Instruction *Inst)
uint32_t CallBlock
The block containing CallInst.
This class represents a workgroup executing a compute command.
void executeMatrixTimesVector(const Instruction *Inst)
void executeCopyMemory(const Instruction *Inst)
void executeVectorExtractDynamic(const Instruction *Inst)
void executeSRem(const Instruction *Inst)
void executeConvertFToU(const Instruction *Inst)
void executeLogicalNot(const Instruction *Inst)
void executeFOrdGreaterThan(const Instruction *Inst)
void executeVectorTimesScalar(const Instruction *Inst)
This class encapsulates information about a pipeline stage.
void executeSLessThan(const Instruction *Inst)
void executeVectorInsertDynamic(const Instruction *Inst)
void executeBitwiseAnd(const Instruction *Inst)
void executeSNegate(const Instruction *Inst)
bool AtBarrier
True when at a barrier.
void executeShiftRightLogical(const Instruction *Inst)
void executeFUnordLessThanEqual(const Instruction *Inst)
void executeBitwiseOr(const Instruction *Inst)
void executeDot(const Instruction *Inst)
const Instruction * getCurrentInstruction() const
Returns the instruction that this invocation is executing.
void executeUnreachable(const Instruction *Inst)
void executeFNegate(const Instruction *Inst)
void executeFUnordGreaterThanEqual(const Instruction *Inst)
void executeImageRead(const Instruction *Inst)
void executeLoad(const Instruction *Inst)
void executeFConvert(const Instruction *Inst)
Dim3 getGlobalId() const
Returns the global invocation ID.
Object getObject(uint32_t Id) const
Returns the object with the specified ID.
Workgroup * Group
The workgroup this invocation belongs to.
void executeConvertFToS(const Instruction *Inst)
std::vector< Object > Objects
Set of result objects.
void executeControlBarrier(const Instruction *Inst)
void executeImage(const Instruction *Inst)
This class represents an instruction result.
void moveToBlock(uint32_t Id)
Move this invocation to the block with ID Id.
void executeReturnValue(const Instruction *Inst)
void executeBranch(const Instruction *Inst)
void executeIMul(const Instruction *Inst)
uint32_t CurrentBlock
The current block.
void executeBranchConditional(const Instruction *Inst)
void executeFUnordEqual(const Instruction *Inst)
This class represents a SPIR-V instruction.
void executeSConvert(const Instruction *Inst)
void executeLogicalOr(const Instruction *Inst)
void executeSwitch(const Instruction *Inst)
void executeFOrdEqual(const Instruction *Inst)
void executeFunctionCall(const Instruction *Inst)
void clearBarrier()
Clear the barrier state, allowing the invocation to continue.
Memory & getMemory(uint32_t StorageClass)
Returns the memory instance associated with StorageClass.
const Function * CurrentFunction
The current function.
void executeSGreaterThan(const Instruction *Inst)
void executeFOrdGreaterThanEqual(const Instruction *Inst)
std::shared_ptr< Memory > PipelineMemory
Memory used for input and output storage classes.
void executeFMod(const Instruction *Inst)
void executeUGreaterThan(const Instruction *Inst)