From ba255eb660c79766dde69c50192fb3183d6bd778 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 7 Aug 2019 17:16:26 -0700 Subject: Fixed compile issue. Imlpementation in header!? --- src/slopestd.cpp | 18 ++++++++++++++++++ src/slopestd.h | 17 +++-------------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/slopestd.cpp b/src/slopestd.cpp index 16b2be4..a88d8e9 100644 --- a/src/slopestd.cpp +++ b/src/slopestd.cpp @@ -3,3 +3,21 @@ template class Neural::SlopeStd; template class Neural::SlopeStd; template class Neural::SlopeStd; + +template<> +float Neural::tpltanh( float sInput ) +{ + return tanhf( sInput ); +} + +template<> +double Neural::tpltanh( double sInput ) +{ + return tanh( sInput ); +} + +template<> +long double Neural::tpltanh( long double sInput ) +{ + return tanhl( sInput ); +} diff --git a/src/slopestd.h b/src/slopestd.h index 116ce1c..5b556ea 100644 --- a/src/slopestd.h +++ b/src/slopestd.h @@ -11,22 +11,11 @@ namespace Neural sigtype tpltanh( sigtype sInput ); template<> - float tpltanh( float sInput ) - { - return tanhf( sInput ); - } - + float tpltanh( float sInput ); template<> - double tpltanh( double sInput ) - { - return tanh( sInput ); - } - + double tpltanh( double sInput ); template<> - long double tpltanh( long double sInput ) - { - return tanhl( sInput ); - } + long double tpltanh( long double sInput ); template class SlopeStd : public Slope -- cgit v1.2.3