Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Namespaces | Macros
computationgraphbuilder.cpp File Reference
#include <ored/scripting/computationgraphbuilder.hpp>
#include <ored/scripting/astresetter.hpp>
#include <ored/scripting/safestack.hpp>
#include <ored/scripting/scriptparser.hpp>
#include <ored/scripting/utilities.hpp>
#include <qle/ad/computationgraph.hpp>
#include <qle/ad/ssaform.hpp>
#include <ored/utilities/log.hpp>
#include <ored/utilities/parsers.hpp>
#include <ored/utilities/to_string.hpp>
#include <qle/math/randomvariable_ops.hpp>
#include <ql/errors.hpp>
#include <ql/indexes/indexmanager.hpp>
#include <boost/timer/timer.hpp>

Go to the source code of this file.

Namespaces

namespace  ore
 Serializable Credit Default Swap.
 
namespace  ore::data
 

Macros

#define TRACE(message, n)
 

Macro Definition Documentation

◆ TRACE

#define TRACE (   message,
 
)
Value:
{ \
if (interactive_) { \
std::cerr << "\nComputationGraphBuilder: " << message << " at " << to_string((n).locationInfo) << "\n"; \
std::cerr << "value (" << std::setw(3) << value.size() << ") = " << value.top() << "\n"; \
std::cerr << "value_node (" << std::setw(3) << value_node.size() << ") = " << value_node.top() \
<< "\n"; \
std::cerr << "filter (" << std::setw(3) << filter.size() << ") = " << filter.top() << "\n"; \
std::cerr << "filter_node (" << std::setw(3) << filter_node.size() << ") = " << filter_node.top() \
<< "\n"; \
std::cerr << printCodeContext(script_, &n); \
std::string c; \
do { \
std::cerr << "(c)ontext (s)sa-form (q)uit "; \
std::getline(std::cin, c); \
if (c == "c") \
std::cerr << "<<<<\n" << context_ << ">>>>\n"; \
else if (c == "s") \
std::cerr << "<<<<\n" << ssaForm(g_, opLabels_) << ">>>>\n"; \
else if (c == "q") \
interactive_ = false; \
} while (c == "c" || c == "s"); \
} \
}
SafeStack< std::size_t > value_node
bool & interactive_
const std::string script_
SafeStack< ValueType > value
SafeStack< std::size_t > filter_node
const std::vector< std::string > opLabels_
SafeStack< Filter > filter
ComputationGraph & g_
Context & context_
std::string ssaForm(const ComputationGraph &g, const std::vector< std::string > &opCodeLabels, const std::vector< T > &values)

Definition at line 40 of file computationgraphbuilder.cpp.

Variable Documentation

◆ g_

ComputationGraph& g_

Definition at line 1463 of file computationgraphbuilder.cpp.

◆ opLabels_

const std::vector<std::string> opLabels_

Definition at line 1464 of file computationgraphbuilder.cpp.

◆ model_

const QuantLib::ext::shared_ptr<ModelCG> model_

Definition at line 1465 of file computationgraphbuilder.cpp.

◆ size_

const Size size_

Definition at line 1466 of file computationgraphbuilder.cpp.

◆ generatePayLog_

const bool generatePayLog_

Definition at line 1467 of file computationgraphbuilder.cpp.

◆ includePastCashflows_

const bool includePastCashflows_

Definition at line 1468 of file computationgraphbuilder.cpp.

◆ script_

const std::string script_

Definition at line 1469 of file computationgraphbuilder.cpp.

◆ interactive_

bool& interactive_

Definition at line 1470 of file computationgraphbuilder.cpp.

◆ keepNodes_

std::set<std::size_t>& keepNodes_

Definition at line 1471 of file computationgraphbuilder.cpp.

◆ payLogEntries_

std::vector<ComputationGraphBuilder::PayLogEntry>& payLogEntries_

Definition at line 1472 of file computationgraphbuilder.cpp.

◆ context_

Context& context_

Definition at line 1474 of file computationgraphbuilder.cpp.

◆ lastVisitedNode_

ASTNode*& lastVisitedNode_

Definition at line 1475 of file computationgraphbuilder.cpp.

◆ filter

SafeStack<Filter> filter

Definition at line 1477 of file computationgraphbuilder.cpp.

◆ value

SafeStack<ValueType> value

Definition at line 1478 of file computationgraphbuilder.cpp.

◆ filter_node

SafeStack<std::size_t> filter_node

Definition at line 1479 of file computationgraphbuilder.cpp.

◆ value_node

SafeStack<std::size_t> value_node

Definition at line 1480 of file computationgraphbuilder.cpp.