mgcpp
A C++ Math Library Based on CUDA
symbolic_shape_expr.hpp
Go to the documentation of this file.
1 #ifndef SYMBOLIC_SHAPE_EXPR_HPP
2 #define SYMBOLIC_SHAPE_EXPR_HPP
3 
5 
6 namespace mgcpp {
7 
8 template <typename Expr>
9 struct shape_expr : expression<Expr> {};
10 
11 struct symbolic_shape_expr_type;
12 
13 template <typename Expr>
14 using symbolic_shape_expr = generic_expr<symbolic_shape_expr_type,
15  0,
16  shape_expr,
17  typename Expr::result_type::shape_type,
18  1,
19  Expr>;
20 
21 /*
22  * Obtain the dynamic shape of this expression
23  */
24 template <typename Expr>
25 inline symbolic_shape_expr<Expr> sym_shape(Expr const& expr) {
26  return symbolic_shape_expr<Expr>(expr);
27 }
28 
29 } // namespace mgcpp
30 
31 #endif // SYMBOLIC_SHAPE_EXPR_HPP
Definition: adapter_base.hpp:12
Definition: expression.hpp:18
Definition: forward.hpp:25
symbolic_shape_expr< Expr > sym_shape(Expr const &expr)
Definition: symbolic_shape_expr.hpp:25
Definition: symbolic_shape_expr.hpp:9