GEGELATI
|
Template class for multiplying a unique argument of type T by a constant parameter. More...
#include <multByConstant.h>
Public Member Functions | |
MultByConstant (const std::string &printTemplate="$0 = $1 * $2;") | |
Constructor for the MultByConstant class so it can be use during the code gen. More... | |
double | execute (const std::vector< Data::UntypedSharedPtr > &args) const override |
Inherited from Instruction. More... | |
![]() | |
virtual bool | isPrintable () const |
function saying if an Instruction can be printed in a C file during the code gen. More... | |
virtual const std::string & | getPrintTemplate () const |
This function return the printTemplate of the line of code used to represent the instruction. More... | |
virtual std::string | getPrintablePrimitiveOperandType (const uint64_t &opIdx) const |
Retrieve the primitive data type of the operand. More... | |
virtual | ~Instruction ()=default |
Default virtual destructor for polyphormism. | |
const std::vector< std::reference_wrapper< const std::type_info > > & | getOperandTypes () const |
Get the list of operand types needed by the Instruction. More... | |
unsigned int | getNbOperands () const |
Get the number of operands required to execute the Instruction. More... | |
virtual bool | checkOperandTypes (const std::vector< Data::UntypedSharedPtr > &arguments) const |
Check if a given vector contains elements whose types corresponds to the types of the Instruction operands. More... | |
virtual double | execute (const std::vector< Data::UntypedSharedPtr > &args) const =0 |
Execute the Instruction for the given arguments. More... | |
Additional Inherited Members | |
![]() | |
Instruction (std::string printTemplate) | |
Protected constructor to force the class abstract nature. More... | |
![]() | |
std::string | printTemplate |
std::vector< std::reference_wrapper< const std::type_info > > | operandTypes |
List of the types of the operands needed to execute the instruction. | |
Template class for multiplying a unique argument of type T by a constant parameter.
Instructions::MultByConstant< T >::MultByConstant | ( | const std::string & | printTemplate = "$0 = $1 * $2;" | ) |
Constructor for the MultByConstant class so it can be use during the code gen.
[in] | printTemplate | std::string use at the generation. Check Instructions::Instruction for more details. |
|
inlineoverridevirtual |
Inherited from Instruction.
Implements Instructions::Instruction.