GEGELATI

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Instructions::AddPrimitiveType< T > Class Template Reference

Template class for add instruction on all types of data: double, int, ... More...

`#include <addPrimitiveType.h>`

Inheritance diagram for Instructions::AddPrimitiveType< T >:

## Public Member Functions
| AddPrimitiveType (const std::string &printTemplate="")
| Constructor for the AddPrimitiveType class, so it can be use during the code gen.
virtual double | execute (const std::vector< Data::UntypedSharedPtr > &args) const override
| Inherited from Instruction.
Public Member Functions inherited from Instructions::Instruction
virtual bool | isPrintable () const
| function saying if an Instruction can be printed in a C file during the code gen.
virtual const std::string & | getPrintTemplate () const
| This function return the printTemplate of the line of code used to represent the instruction.
virtual std::string | getPrintablePrimitiveOperandType (const uint64_t &opIdx) const
| Retrieve the primitive data type of the operand.
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.
unsigned int | getNbOperands () const
| Get the number of operands required to execute the Instruction.
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.

## Additional Inherited Members
Protected Member Functions inherited from Instructions::Instruction
| Instruction (std::string printTemplate)
| Protected constructor to force the class abstract nature.
Protected Attributes inherited from Instructions::Instruction
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.

## Detailed Description

template<class T>
class Instructions::AddPrimitiveType< T >

Template class for add instruction on all types of data: double, int, ...

## Constructor & Destructor Documentation

## ◆ AddPrimitiveType()

template<class T >

Instructions::AddPrimitiveType< T >::AddPrimitiveType | ( | const std::string & | printTemplate = "" | ) |

Constructor for the AddPrimitiveType class, so it can be use during the code gen.

Parameters

  [in] | printTemplate | std::string use at the generation. Check Instructions::Instruction for more details.

## Member Function Documentation

## ◆ execute()

template<class T >

double Instructions::AddPrimitiveType< T >::execute | ( | const std::vector< Data::UntypedSharedPtr > & | args | ) | const
| override virtual

Inherited from Instruction.

Implements Instructions::Instruction.

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

- D:/a/gegelati/gegelati/gegelatilib/include/instructions/addPrimitiveType.h