mgcpp
A C++ Math Library Based on CUDA
Public Member Functions | Protected Attributes | List of all members
mgcpp::eval_context Struct Reference

#include <eval_context.hpp>

Public Member Functions

template<size_t Num, typename ResultType >
void feed (placeholder_node< Num, ResultType > ph, ResultType const &val)
 
template<size_t PlaceholderID, typename ResultType >
ResultType get_placeholder () const
 

Protected Attributes

std::unordered_map< int, static_any_placeholders
 

Member Function Documentation

◆ feed()

template<size_t Num, typename ResultType >
void mgcpp::eval_context::feed ( placeholder_node< Num, ResultType >  ph,
ResultType const &  val 
)

Associate a value to a placeholder. The associated value will be fed to the placeholder's place when the graph is evaluated.

Parameters
phThe placeholder.
valThe value associated with the placeholder.

◆ get_placeholder()

template<size_t PlaceholderID, typename ResultType >
ResultType mgcpp::eval_context::get_placeholder ( ) const

Get the value of the placeholder associated with the PlaceholderID. ResultType should be the type of the value when feed() was called.

Member Data Documentation

◆ _placeholders

std::unordered_map<int, static_any> mgcpp::eval_context::_placeholders
protected

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