Functors-Impl.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: Functors-Impl.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Functors for CubbyFlow.
6 > Created Time: 2017/09/26
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_FUNCTORS_IMPL_H
10 #define CUBBYFLOW_FUNCTORS_IMPL_H
11 
12 namespace CubbyFlow
13 {
14  template <typename T, typename U>
15  constexpr U TypeCast<T, U>::operator()(const T& a) const
16  {
17  return static_cast<U>(a);
18  }
19 
20  template <typename T>
21  constexpr T RMinus<T>::operator()(const T& a, const T& b) const
22  {
23  return b - a;
24  }
25 
26  template <typename T>
27  constexpr T RDivides<T>::operator()(const T& a, const T& b) const
28  {
29  return b / a;
30  }
31 }
32 
33 #endif
constexpr U operator()(const T &a) const
Definition: Functors-Impl.h:15
Definition: pybind11Utils.h:24
constexpr T operator()(const T &a, const T &b) const
Definition: Functors-Impl.h:21
constexpr T operator()(const T &a, const T &b) const
Definition: Functors-Impl.h:27