mgcpp
A C++ Math Library Based on CUDA
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>
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 
42 #endif // EVAL_CONTEXT_HPP
Definition: adapter_base.hpp:12
Definition: eval_context.hpp:20
void feed(placeholder_node< Num, ResultType > ph, ResultType const &val)
ResultType get_placeholder() const
Definition: forward.hpp:25
std::unordered_map< int, static_any > _placeholders
Definition: eval_context.hpp:36