CoDiPack  2.3.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::CommonBaseTapeReader< T_Type > Struct Template Reference

Used to restore the IO from the "filename"IO.dat or "filename"IO.txt files. Also provides the get methods from the codi::tapeReaderInterface. More...

#include <commonReaderWriterBase.hpp>

Inheritance diagram for codi::CommonBaseTapeReader< T_Type >:

Public Types

using Identifier = typename Type::Identifier
 See TapeReaderInterface.
 
using Tape = typename Type::Tape
 See TapeReaderInterface.
 
using Type = T_Type
 See TapeReaderInterface.
 
- Public Types inherited from codi::TapeReaderInterface< T_Type >
using Identifier = typename Type::Identifier
 Identifier for the internal management, e.g. int.
 
using Real = typename Type::Real
 Primal computation type, e.g. double.
 
using Tape = typename Type::Tape
 The tape type that is to be restored.
 
using Type = T_Type
 The evaluation type.
 

Public Attributes

std::vector< IdentifierinputVariables
 Stores the restored input variables from the tape file.
 
Identifier largestIndex
 The largest index on the stored tape.
 
size_t nInputs
 Size of the input vector.
 
size_t nOutputs
 Size of the output vector.
 
std::vector< IdentifieroutputVariables
 Stores the restored output variables from the tape file.
 
Tape tape
 The newly resorted tape.
 
- Public Attributes inherited from codi::CommonReaderWriterMethods
std::string fileName
 The base file name provided by the user.
 

Protected Member Functions

std::vector< Identifier > const & getInputs () const &
 Used to get the restored inputs of the tape.
 
std::vector< Identifier > const & getOutputs () const &
 
TapegetTape ()
 Used to get a reference to the restored tape.
 
void restoreIoBinary ()
 Restore the IO for the binary readers.
 
void restoreIoText ()
 Constructor.
 
void updateUserIO (Identifier const &linearOffset)
 This method is used to remove any offset and to update the largest created index.
 

Additional Inherited Members

- Public Member Functions inherited from codi::TapeReaderInterface< T_Type >
virtual void readFile (std::string const &name)
 This method uses the the fileName to reproduce a valid tape.
 
virtual ~TapeReaderInterface ()
 Destructor.
 
- Public Member Functions inherited from codi::CommonReaderWriterMethods
 CommonReaderWriterMethods ()
 Constructor.
 
 CommonReaderWriterMethods (std::string const &name)
 Constructor.
 
std::string modifyFileName (std::string const &suffix)
 Remove the file extension and replace it with a new suffix.
 
void openFile (FILE *&fileHandle, std::string const &name, std::string const &mode)
 

Detailed Description

template<typename T_Type>
struct codi::CommonBaseTapeReader< T_Type >

Used to restore the IO from the "filename"IO.dat or "filename"IO.txt files. Also provides the get methods from the codi::tapeReaderInterface.

Template Parameters
T_TypeThe CoDiPack type of the tape that is to be restored.

Member Function Documentation

◆ getInputs()

template<typename T_Type >
std::vector< Identifier > const & codi::CommonBaseTapeReader< T_Type >::getInputs ( ) const &
inlineprotectedvirtual

Used to get the restored inputs of the tape.

Implements codi::TapeReaderInterface< T_Type >.

◆ getOutputs()

template<typename T_Type >
std::vector< Identifier > const & codi::CommonBaseTapeReader< T_Type >::getOutputs ( ) const &
inlineprotectedvirtual

Used to get the restored outputs of the tape.

Implements codi::TapeReaderInterface< T_Type >.

◆ getTape()

template<typename T_Type >
Tape & codi::CommonBaseTapeReader< T_Type >::getTape ( )
inlineprotectedvirtual

Used to get a reference to the restored tape.

Implements codi::TapeReaderInterface< T_Type >.

◆ restoreIoText()

template<typename T_Type >
void codi::CommonBaseTapeReader< T_Type >::restoreIoText ( )
inlineprotected

Constructor.

Restore the IO for the text readers.


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