Class simtix::InstrPtr
Pointer to the <Instr> object. More...
#include <instr_ptr.h>
Public Functions
Type | Name |
---|---|
void | AddKonataLabel (std::string_view label) Add a Konata label to this <InstrPtr> if it is valid. |
InstrPtr | DuplicateForWarp (Warp * warp) noexcept const Explicit duplicate the instruction. |
void | Instantiate (uint32_t iword) Instantiate the <Instr> object based on the given instruction word. |
void | Instantiate (riscv::Exceptions exception) Instantiate the <Instr> object based on the given exception code. |
InstrPtr () Default constructor that instantiate an invalid <InstrPtr>. |
|
InstrPtr (Warp * warp, uint64_t wpc, std::optional< uint32_t > ssw) Basic constructor. |
|
InstrPtr (const InstrPtr &) = delete |
|
InstrPtr (InstrPtr && other) Move constructor. |
|
Instr * | instr () noexcept const |
Instr * | operator-> () noexcept const -> operator is used to access the <Instr> and its public APIs. |
InstrPtr & | operator= (const InstrPtr &) = delete |
InstrPtr & | operator= (InstrPtr && other) noexcept &operator= is used to aquire ownership from the other <InstrPtr>. |
void | set_flushed () |
std::optional< uint32_t > | ssw () noexcept const |
uint64_t | unique_id () noexcept const |
uint32_t | wid () noexcept const |
uint64_t | wpc () noexcept const |
~InstrPtr () |
Public Static Functions
Type | Name |
---|---|
void | set_first_stage_name (std::string_view first_stage_name) |
Detailed Description
This class manages the Konata serial ID and the the ownership of an allocated <Instr> object. This class acts like a std::unique_ptr so it will automatically recycle the <Instr> object back to pool during destruction.
Public Functions Documentation
function AddKonataLabel
Add a Konata label to this <InstrPtr> if it is valid.
Parameters:
label
The label to add.
function DuplicateForWarp
Explicit duplicate the instruction.
This function instantiate another <InstrPtr> object and copy all fileds except the <Warp> pointer, and allocate an identical <Instr> from the same pool.
Parameters:
warp
The warp for the duplicated instruction to bind with.
Returns:
An <InstrPtr> object.
function Instantiate [1/2]
Instantiate the <Instr> object based on the given instruction word.
This fucntion determines the <InstrPool> to allocate an instruction from.
Parameters:
iword
The instruction word of this instruction.
function Instantiate [2/2]
Instantiate the <Instr> object based on the given exception code.
This fucntion determines the <InstrPool> to allocate an instruction from.
Parameters:
exception
The exception code of this instruction.
function InstrPtr [1/4]
Default constructor that instantiate an invalid <InstrPtr>.
function InstrPtr [2/4]
Basic constructor.
Basic constructor that instantiate an <InstrPtr> and assign an Konata serial ID to it.
Parameters:
warp
Pointer to the <Warp> that the warp instruction is associated to.wpc
The PC of the warp instruction.ssw
The spatial sub-warp id.
function InstrPtr [3/4]
function InstrPtr [4/4]
Move constructor.
Move constructor that aquire the instruction's ownership from the other <InstrPtr> object.
Parameters:
other
The R-value reference to the other <InstrPtr>.
function instr
function operator->
-> operator is used to access the <Instr> and its public APIs.
Returns:
The pointer to the <Instr> object.
function operator=
function operator=
&operator= is used to aquire ownership from the other <InstrPtr>.
Parameters:
other
The R-value reference to the other <InstrPtr>.
Returns:
The reference to this.
function set_flushed
Mark this instruction as flushed.
function ssw
function unique_id
function wid
function wpc
function ~InstrPtr
Public Static Functions Documentation
function set_first_stage_name
The documentation for this class was generated from the following file projects/simtix/src/simtix/sm/instr_ptr.h