[mlpack-git] master: Even more hard-coded forward declarations (5b0bd16)

gitdub at mlpack.org gitdub at mlpack.org
Thu Jul 21 07:22:03 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/ba850f782a53c5a77b7985f7647f609bd96cb5e7...2c026d838925df436d967439899813da5d34c702

>---------------------------------------------------------------

commit 5b0bd166764d98ed4fc0f3330c19e5ac61bacfe7
Author: Yannis Mentekidis <mentekid at gmail.com>
Date:   Thu Jul 21 12:22:03 2016 +0100

    Even more hard-coded forward declarations


>---------------------------------------------------------------

5b0bd166764d98ed4fc0f3330c19e5ac61bacfe7
 src/mlpack/core/boost_backport/detail/polygamma.hpp | 19 +++++++++++++++++++
 src/mlpack/core/boost_backport/polygamma.hpp        | 12 ++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/src/mlpack/core/boost_backport/detail/polygamma.hpp b/src/mlpack/core/boost_backport/detail/polygamma.hpp
index 704c3d4..18c6d80 100644
--- a/src/mlpack/core/boost_backport/detail/polygamma.hpp
+++ b/src/mlpack/core/boost_backport/detail/polygamma.hpp
@@ -27,6 +27,25 @@
   #include <boost/static_assert.hpp>
   #include <boost/type_traits/is_convertible.hpp>
   
+  // Forward declarations.
+  namespace boost {namespace math 
+    
+    // Forward declaration of boost::math::polygamma.
+    template<class T, class Policy>
+    inline typename tools::promote_args<T>::type polygamma(const int n, T x, const Policy& pol);
+    template<class T>
+    inline typename tools::promote_args<T>::type polygamma(const int n, T x);
+    
+    
+    { namespace policies{
+      // Forward declaration of boost::math::policies::digits_base10.
+      template <class T, class Policy>
+      inline BOOST_MATH_CONSTEXPR int digits_base10(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_NOEXCEPT;
+  }}}
+  
+
+
+
   namespace boost { namespace math { namespace detail{
 
   template<class T, class Policy>
diff --git a/src/mlpack/core/boost_backport/polygamma.hpp b/src/mlpack/core/boost_backport/polygamma.hpp
index 5fb954c..49e3e3b 100644
--- a/src/mlpack/core/boost_backport/polygamma.hpp
+++ b/src/mlpack/core/boost_backport/polygamma.hpp
@@ -15,6 +15,18 @@
 #include "detail/polygamma.hpp"
 #include "trigamma.hpp"
 
+// Forward declarations
+namespace boost { namespace math {
+  template <class T, class Policy>
+  inline typename tools::promote_args<T>::type 
+  trigamma(T x, const Policy&);
+
+
+  template <class T>
+  inline typename tools::promote_args<T>::type 
+  trigamma(T x);
+}}
+
 namespace boost { namespace math {
 
   




More information about the mlpack-git mailing list