mgcpp
A C++ Math Library Based on CUDA
include
mgcpp
expressions
eval_context.hpp
Go to the documentation of this file.
1
2
// Copyright RedPortal, mujjingun 2017 - 2018.
3
// Distributed under the Boost Software License, Version 1.0.
4
// (See accompanying file LICENSE or copy at
5
// http://www.boost.org/LICENSE_1_0.txt)
6
7
#ifndef EVAL_CONTEXT_HPP
8
#define EVAL_CONTEXT_HPP
9
10
#include <memory>
11
#include <
mgcpp/expressions/expression.hpp
>
12
#include <
mgcpp/expressions/forward.hpp
>
13
#include <
mgcpp/expressions/placeholder.hpp
>
14
#include <
mgcpp/global/type_erased.hpp
>
15
#include <type_traits>
16
#include <unordered_map>
17
18
namespace
mgcpp
{
19
20
struct
eval_context
{
26
template
<
size_t
Num,
typename
ResultType>
27
void
feed
(
placeholder_node<Num, ResultType>
ph, ResultType
const
& val);
28
32
template
<
size_t
PlaceholderID,
typename
ResultType>
33
ResultType
get_placeholder
()
const
;
34
35
protected
:
36
std::unordered_map<int, static_any>
_placeholders
;
37
};
38
39
}
// namespace mgcpp
40
41
#include <
mgcpp/expressions/eval_context.tpp
>
42
#endif // EVAL_CONTEXT_HPP
mgcpp
Definition:
adapter_base.hpp:12
mgcpp::eval_context
Definition:
eval_context.hpp:20
mgcpp::eval_context::feed
void feed(placeholder_node< Num, ResultType > ph, ResultType const &val)
mgcpp::eval_context::get_placeholder
ResultType get_placeholder() const
expression.hpp
mgcpp::generic_expr
Definition:
forward.hpp:25
eval_context.tpp
mgcpp::eval_context::_placeholders
std::unordered_map< int, static_any > _placeholders
Definition:
eval_context.hpp:36
placeholder.hpp
type_erased.hpp
forward.hpp
Generated by
1.8.13