GEGELATI

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Data::DataHandlerPrinter Class Reference

Class used to generate the declaration of operands of a line for the code gen. More...

`#include <dataHandlerPrinter.h>`

## Public Member Functions
| DataHandlerPrinter ()=default
| Constructor for the DataHandlerPrinter.
virtual | ~DataHandlerPrinter ()=default
| destructor
| DataHandlerPrinter (const DataHandlerPrinter &other)=default
| copy constructor
std::string | printDataAt (const Data::DataHandler &dataHandler, const std::type_info &type, const size_t &address, const std::string &nameVar) const
| Function used to generate the declaration of an operand based on its type.
std::string | print1DArray (const size_t &start, const size_t &size, const std::string &nameVar) const
| Function that return the initialization of a 1D array.
std::string | print2DArray (const size_t &start, const std::vector< size_t > &sourceTabSize, const std::vector< size_t > &generatedTabSize, const std::string &nameVar) const
| Function that return the initialization of a 2D array.
std::string | getDemangleTemplateType (const Data::DataHandler &dataHandler) const
| function used to retrieve the typename of the template of the DataHandler.

## Static Public Member Functions
static std::vector< size_t > | getOperandSizes (const std::type_info &type)
| Function that return the size of each dimension of an operand.

## Detailed Description

Class used to generate the declaration of operands of a line for the code gen.

## Member Function Documentation

## ◆ getDemangleTemplateType()

std::string Data::DataHandlerPrinter::getDemangleTemplateType | ( | const Data::DataHandler & | dataHandler | ) | const

function used to retrieve the typename of the template of the DataHandler.

Parameters

  [in] | dataHandler | const reference to the Data::DataHandler that must be printed

Returns
  template type of the DataHandler in a human readable format.

## ◆ getOperandSizes()

std::vector< size_t > Data::DataHandlerPrinter::getOperandSizes | ( | const std::type_info & | type | ) |
| static

Function that return the size of each dimension of an operand.

Parameters

  [in] | type | the std::type_info of the operand.

Returns
  a std::vector containing the size of each dimension of the operand of type type.

## ◆ print1DArray()

std::string Data::DataHandlerPrinter::print1DArray | ( | const size_t & | start,
|  | const size_t & | size,
|  | const std::string & | nameVar ) const

Function that return the initialization of a 1D array.

Parameters

  [in] | start | the address of the first element of the array to extract.
  [in] | size | the size of the array to print.
  [in] | nameVar | the name of the global variable in which the array have to be extracted.

Returns
  The initialization of a 1D array of size size extrated of the global variable nameVar at address start.

## ◆ print2DArray()

std::string Data::DataHandlerPrinter::print2DArray | ( | const size_t & | start,
|  | const std::vector< size_t > & | sourceTabSize,
|  | const std::vector< size_t > & | generatedTabSize,
|  | const std::string & | nameVar ) const

Function that return the initialization of a 2D array.

This function generates generatedTabSize[1] (the height of the operand) 1D array by calling the function print1DArray.

Parameters

  [in] | start | the address of the first element of the array to extract.
  [in] | sourceTabSize | a const reference to a std::vector containing the height and the width of the global variable.
  [in] | generatedTabSize | a const reference to a std::vector containing the height and the width of the operand that has to be printed.
  [in] | nameVar | the name of the global variable in which the array have to be extracted.

Returns
  The initialization of a 2D array of size generatedTabSize extracted of the global variable nameVar at address start.

## ◆ printDataAt()

std::string Data::DataHandlerPrinter::printDataAt | ( | const Data::DataHandler & | dataHandler,
|  | const std::type_info & | type,
|  | const size_t & | address,
|  | const std::string & | nameVar ) const

Function used to generate the declaration of an operand based on its type.

Parameters

  [in] | dataHandler | const reference to the Data::DataHandler that is accessed by the printed code.
  [in] | type | the std::type_info of the operand that we want to print.
  [in] | address | the location of the data to print.
  [in] | nameVar | the name of the source global variable in the generated code.

Returns
  The end of the declaration of the operand of type : type and its initialization based on the extracted data of the global variable nameVar at index address.

Copyright or © or Copr. IETR/INSA - Rennes (2021) :

Karol Desnos kdesn.nosp@m.os@i.nosp@m.nsa-r.nosp@m.enne.nosp@m.s.fr (2021) Thomas Bourgoin tbour.nosp@m.goi@.nosp@m.insa-.nosp@m.renn.nosp@m.es.fr (2021)

GEGELATI is an open-source reinforcement learning framework for training artificial intelligence based on Tangled Program Graphs (TPGs).

This software is governed by the CeCILL-C license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL-C license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".

As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.

In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.

The fact that you are presently reading this means that you have had knowledge of the CeCILL-C license and that you accept its terms.

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

- D:/a/gegelati/gegelati/gegelatilib/include/data/dataHandlerPrinter.h
- D:/a/gegelati/gegelati/gegelatilib/src/data/dataHandlerPrinter.cpp