toon-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Toon-members] TooN helpers.h so3.h internal/config.hh interna...


From: Gerhard Reitmayr
Subject: [Toon-members] TooN helpers.h so3.h internal/config.hh interna...
Date: Sat, 31 Oct 2009 11:32:10 +0000

CVSROOT:        /cvsroot/toon
Module name:    TooN
Changes by:     Gerhard Reitmayr <gerhard>      09/10/31 11:32:10

Modified files:
        .              : helpers.h so3.h 
        internal       : config.hh vbase.hh 

Log message:
        fixes for MSVC

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/helpers.h?cvsroot=toon&r1=1.83&r2=1.84
http://cvs.savannah.gnu.org/viewcvs/TooN/so3.h?cvsroot=toon&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/config.hh?cvsroot=toon&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/vbase.hh?cvsroot=toon&r1=1.40&r2=1.41

Patches:
Index: helpers.h
===================================================================
RCS file: /cvsroot/toon/TooN/helpers.h,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- helpers.h   26 Aug 2009 09:51:09 -0000      1.83
+++ helpers.h   31 Oct 2009 11:32:10 -0000      1.84
@@ -37,7 +37,10 @@
 
 #ifndef M_PI
 #define M_PI 3.14159265358979323846
-#define M_SQRT1_2 0.70710678118654752440
+#endif
+
+#ifndef M_SQRT1_2
+#define M_SQRT1_2 0.707106781186547524401
 #endif
 
 namespace TooN {
@@ -99,7 +102,8 @@
        ///@param v \e v
        ///@ingroup gLinAlg
        template<int Size, typename Precision, typename Base> inline 
Vector<(Size==Dynamic?Dynamic:Size-1), Precision> project( const Vector<Size, 
Precision, Base> & v){
-               return v.template slice<0, End<-1> >() / v[v.size() - 1];
+               static const int Len = (Size==Dynamic?Dynamic:Size-1);
+               return v.template slice<0, Len>(0, v.size()-1) / v[v.size() - 
1];
        }
        
        //This should probably be done with an operator to prevent an extra 
new[] for dynamic vectors.
@@ -108,7 +112,8 @@
        ///@ingroup gLinAlg
        template<int Size, typename Precision, typename Base> inline 
Vector<(Size==Dynamic?Dynamic:Size+1), Precision> unproject( const Vector<Size, 
Precision, Base> & v){
                Vector<(Size==Dynamic?Dynamic:Size+1), Precision> 
result(v.size()+1);
-               result.template slice<0,End<-1> >() = v;
+               static const int Len = (Size==Dynamic?Dynamic:Size);
+               result.template slice<0, Len>(0, v.size()) = v;
                result[v.size()] = 1;
                return result;
        }

Index: so3.h
===================================================================
RCS file: /cvsroot/toon/TooN/so3.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- so3.h       10 Jul 2009 14:05:55 -0000      1.40
+++ so3.h       31 Oct 2009 11:32:10 -0000      1.41
@@ -235,6 +235,9 @@
 template <typename Precision>
 template<int S, typename VA>
 inline SO3<Precision> SO3<Precision>::exp(const Vector<S,Precision,VA>& w){
+       using std::sqrt;
+       using std::sin;
+       using std::cos;
        SizeMismatch<3,S>::test(3, w.size());
        
        static const Precision one_6th = 1.0/6.0;

Index: internal/config.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/config.hh,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- internal/config.hh  26 Aug 2009 07:49:20 -0000      1.14
+++ internal/config.hh  31 Oct 2009 11:32:10 -0000      1.15
@@ -3,12 +3,12 @@
 
 /* #undef TOON_TYPEOF_TYPEOF */
 
-#define TOON_TYPEOF___TYPEOF__ 1
+/* #define TOON_TYPEOF___TYPEOF__ 1 */
 
 /* #undef TOON_TYPEOF_BOOST */
 
 /* #undef TOON_TYPEOF_BUILTIN */
 
-#define TOON_DEPRECATED_GCC 1
+/* #define TOON_DEPRECATED_GCC 1 */
 
 #define TOON_USE_LAPACK 1

Index: internal/vbase.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/vbase.hh,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- internal/vbase.hh   28 Sep 2009 08:31:58 -0000      1.40
+++ internal/vbase.hh   31 Oct 2009 11:32:10 -0000      1.41
@@ -33,7 +33,6 @@
 namespace Internal{
 template<int Size, class Precision, int Stride, class Mem> struct GenericVBase;
 
-
 
////////////////////////////////////////////////////////////////////////////////
 //
 // Slice holding class
@@ -179,7 +178,8 @@
        TOON_INTERNAL_MAKE_END(D0##8);\
        TOON_INTERNAL_MAKE_END(D0##9); 
 
-       TOON_INTERNAL_MAKE_END_99(-0x);
+#ifndef WIN32 
+       TOON_INTERNAL_MAKE_END_99(-);
        TOON_INTERNAL_MAKE_END_99(-1);
        TOON_INTERNAL_MAKE_END_99(-2);
        TOON_INTERNAL_MAKE_END_99(-3);
@@ -189,7 +189,7 @@
        TOON_INTERNAL_MAKE_END_99(-7);
        TOON_INTERNAL_MAKE_END_99(-8);
        TOON_INTERNAL_MAKE_END_99(-9);
-
+#endif
        #undef TOON_INTERNAL_MAKE_END
        #undef TOON_INTERNAL_MAKE_END99
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]