summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <mbuland@penny-arcade.com>2019-08-07 17:16:26 -0700
committerMike Buland <mbuland@penny-arcade.com>2019-08-07 17:16:26 -0700
commitba255eb660c79766dde69c50192fb3183d6bd778 (patch)
tree1bfd89f9af8b5ac7b6120b5079b8f2a8d2c4c836
parentc989db816497efd6ef1f36bfb8979de60248b435 (diff)
downloadlibneural-ba255eb660c79766dde69c50192fb3183d6bd778.tar.gz
libneural-ba255eb660c79766dde69c50192fb3183d6bd778.tar.bz2
libneural-ba255eb660c79766dde69c50192fb3183d6bd778.tar.xz
libneural-ba255eb660c79766dde69c50192fb3183d6bd778.zip
Fixed compile issue. Imlpementation in header!?
-rw-r--r--src/slopestd.cpp18
-rw-r--r--src/slopestd.h17
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 @@
3template class Neural::SlopeStd<float>; 3template class Neural::SlopeStd<float>;
4template class Neural::SlopeStd<double>; 4template class Neural::SlopeStd<double>;
5template class Neural::SlopeStd<long double>; 5template class Neural::SlopeStd<long double>;
6
7template<>
8float Neural::tpltanh<float>( float sInput )
9{
10 return tanhf( sInput );
11}
12
13template<>
14double Neural::tpltanh<double>( double sInput )
15{
16 return tanh( sInput );
17}
18
19template<>
20long double Neural::tpltanh<long double>( long double sInput )
21{
22 return tanhl( sInput );
23}
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
11 sigtype tpltanh( sigtype sInput ); 11 sigtype tpltanh( sigtype sInput );
12 12
13 template<> 13 template<>
14 float tpltanh<float>( float sInput ) 14 float tpltanh<float>( float sInput );
15 {
16 return tanhf( sInput );
17 }
18
19 template<> 15 template<>
20 double tpltanh<double>( double sInput ) 16 double tpltanh<double>( double sInput );
21 {
22 return tanh( sInput );
23 }
24
25 template<> 17 template<>
26 long double tpltanh<long double>( long double sInput ) 18 long double tpltanh<long double>( long double sInput );
27 {
28 return tanhl( sInput );
29 }
30 19
31 template<typename sigtype> 20 template<typename sigtype>
32 class SlopeStd : public Slope<sigtype> 21 class SlopeStd : public Slope<sigtype>