toon-members
[Top][All Lists]
Advanced

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

[Toon-members] TooN/internal operators.hh


From: Gerhard Reitmayr
Subject: [Toon-members] TooN/internal operators.hh
Date: Wed, 08 Apr 2009 10:28:58 +0000

CVSROOT:        /cvsroot/toon
Module name:    TooN
Changes by:     Gerhard Reitmayr <gerhard>      09/04/08 10:28:58

Modified files:
        internal       : operators.hh 

Log message:
        diagmult for vector,vector

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/operators.hh?cvsroot=toon&r1=1.31&r2=1.32

Patches:
Index: operators.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/operators.hh,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- operators.hh        2 Apr 2009 13:15:28 -0000       1.31
+++ operators.hh        8 Apr 2009 10:28:56 -0000       1.32
@@ -112,6 +112,14 @@
        return 
Operator<Internal::VPairwise<Internal::Subtract,S1,P1,B1,S2,P2,B2> >(v1,v2);
 }
 
+// diagmult Vector, Vector
+template <int S1, int S2, typename P1, typename P2, typename B1, typename B2>
+Vector<Internal::Sizer<S1,S2>::size, typename 
Internal::MultiplyType<P1,P2>::type> diagmult(const Vector<S1,P1,B1>& v1, const 
Vector<S2,P2,B2>& v2)
+{
+       SizeMismatch<S1,S2>::test(v1.size(),v2.size());
+       return 
Operator<Internal::VPairwise<Internal::Multiply,S1,P1,B1,S2,P2,B2> >(v1,v2);
+}
+
 template<int S, typename P, typename A>
 struct Operator<Internal::VNegate<S, P, A> > {
        const Vector<S, P, A> & input;
@@ -343,8 +351,6 @@
 
 
 
-
-
 
////////////////////////////////////////////////////////////////////////////////
 //
 // vector <op> scalar 




reply via email to

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