public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sci-mathematics/freemat/files: freemat-4.0-gcc45.patch
@ 2010-05-05 16:11 Sebastien Fabbro (bicatali)
  0 siblings, 0 replies; only message in thread
From: Sebastien Fabbro (bicatali) @ 2010-05-05 16:11 UTC (permalink / raw
  To: gentoo-commits

bicatali    10/05/05 16:11:18

  Added:                freemat-4.0-gcc45.patch
  Log:
  Added a patch to compile with gcc-4.5, thanks Xarthisius, bug #318045
  (Portage version: 2.2_rc67/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  sci-mathematics/freemat/files/freemat-4.0-gcc45.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/freemat/files/freemat-4.0-gcc45.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/freemat/files/freemat-4.0-gcc45.patch?rev=1.1&content-type=text/plain

Index: freemat-4.0-gcc45.patch
===================================================================
Fix building with gcc-4.5

http://bugs.gentoo.org/show_bug.cgi?id=318045

--- libs/libFreeMat/Array.cpp
+++ libs/libFreeMat/Array.cpp
@@ -465,7 +465,7 @@
 
 void Array::set(const QString& field, ArrayVector& data) {
   if (isEmpty() && m_type.Class != Struct)
-    *this = Array::Array(Struct);
+    *this = Array(Struct);
   if (m_type.Class != Struct) throw Exception("Unsupported type for A.field=B");
   StructArray &rp(structPtr());
   if (isEmpty()) 
--- libs/libFreeMat/Math.cpp
+++ libs/libFreeMat/Math.cpp
@@ -1590,9 +1590,9 @@
 
 Array Not(const Array& A) {
   if (A.isScalar())
-    return Array::Array(!A.toClass(Bool).constRealScalar<bool>());
+    return Array(!A.toClass(Bool).constRealScalar<bool>());
   const Array &Abool(A.toClass(Bool));
-  return Array::Array(Apply(Abool.constReal<bool>(),notfunc));
+  return Array(Apply(Abool.constReal<bool>(),notfunc));
 }
 
 Array Plus(const Array& A) {
--- libs/libFreeMat/Operators.hpp
+++ libs/libFreeMat/Operators.hpp
@@ -142,11 +142,11 @@
   if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
   if (Acast.isScalar() && Bcast.isScalar()) {
     if (Acast.allReal() && Bcast.allReal()) {
-      F = Array::Array(Op::func(Acast.constRealScalar<T>(),
+      F = Array(Op::func(Acast.constRealScalar<T>(),
 				Bcast.constRealScalar<T>()));
     } else {
       Acast.forceComplex(); Bcast.forceComplex();
-      F = Array::Array(T(0),T(0));
+      F = Array(T(0),T(0));
       Op::func(Acast.constRealScalar<T>(),
 	       Acast.constImagScalar<T>(),
 	       Bcast.constRealScalar<T>(),
@@ -155,7 +155,7 @@
     }
   } else if (Acast.isScalar()) {
     if (Acast.allReal() && Bcast.allReal()) {
-      F = Array::Array(Tclass,Bcast.dimensions());
+      F = Array(Tclass,Bcast.dimensions());
       T* ret = F.real<T>().data();
       const T& Ap = Acast.constRealScalar<T>();
       const T* Bp = Bcast.constReal<T>().constData();
@@ -163,7 +163,7 @@
       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
     } else {
       Acast.forceComplex(); Bcast.forceComplex();
-      F = Array::Array(Tclass,Bcast.dimensions());
+      F = Array(Tclass,Bcast.dimensions());
       T* Cr = F.real<T>().data();
       T* Ci = F.imag<T>().data();
       const T& Ar = Acast.constRealScalar<T>();
@@ -175,7 +175,7 @@
     }
   } else if (Bcast.isScalar()) {
     if (Bcast.allReal() && Acast.allReal()) {
-      F = Array::Array(Tclass,Acast.dimensions());
+      F = Array(Tclass,Acast.dimensions());
       T* ret = F.real<T>().data();
       const T* Ap = Acast.constReal<T>().constData();
       const T& Bp = Bcast.constRealScalar<T>();
@@ -183,7 +183,7 @@
       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp);
     } else { 
       Acast.forceComplex(); Bcast.forceComplex();
-      F = Array::Array(Tclass,Acast.dimensions());
+      F = Array(Tclass,Acast.dimensions());
       T* Cr = F.real<T>().data();
       T* Ci = F.imag<T>().data();
       const T* Ar = Acast.constReal<T>().constData();
@@ -197,7 +197,7 @@
     if (Acast.dimensions() != Bcast.dimensions())
       throw Exception("size mismatch in arguments to binary operator");
     if (Bcast.allReal() && Acast.allReal()) {
-      F = Array::Array(Tclass,Acast.dimensions());
+      F = Array(Tclass,Acast.dimensions());
       T* ret = F.real<T>().data();
       const T* Ap = Acast.constReal<T>().constData();
       const T* Bp = Bcast.constReal<T>().constData();
@@ -205,7 +205,7 @@
       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp[i]);
     } else {
       Acast.forceComplex(); Bcast.forceComplex();
-      F = Array::Array(Tclass,Acast.dimensions());
+      F = Array(Tclass,Acast.dimensions());
       T* Cr = F.real<T>().data();
       T* Ci = F.imag<T>().data();
       const T* Ar = Acast.constReal<T>().constData();
@@ -328,17 +328,17 @@
   if (!Acast.isScalar()) Acast = Acast.asDenseArray();
   if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
   if (Acast.isScalar() && Bcast.isScalar()) {
-    F = Array::Array(Op::func(Acast.constRealScalar<T>(),
+    F = Array(Op::func(Acast.constRealScalar<T>(),
 			      Bcast.constRealScalar<T>()));
   } else if (Acast.isScalar()) {
-    F = Array::Array(Bool,Bcast.dimensions());
+    F = Array(Bool,Bcast.dimensions());
     bool* ret = F.real<bool>().data();
     const T& Ap = Acast.constRealScalar<T>();
     const T* Bp = Bcast.constReal<T>().constData();
     uint64 q = uint64(Bcast.length());
     for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
   } else if (Bcast.isScalar()) {
-    F = Array::Array(Bool,Acast.dimensions());
+    F = Array(Bool,Acast.dimensions());
     bool* ret = F.real<bool>().data();
     const T* Ap = Acast.constReal<T>().constData();
     const T& Bp = Bcast.constRealScalar<T>();
@@ -347,7 +347,7 @@
   } else {
     if (Acast.dimensions() != Bcast.dimensions())
       throw Exception("size mismatch in arguments to binary operator");
-    F = Array::Array(Bool,Acast.dimensions());
+    F = Array(Bool,Acast.dimensions());
     bool* ret = F.real<bool>().data();
     const T* Ap = Acast.constReal<T>().constData();
     const T* Bp = Bcast.constReal<T>().constData();
@@ -395,18 +395,18 @@
   if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
   if (Acast.isScalar() && Bcast.isScalar()) {
     if (Acast.allReal() && Bcast.allReal()) {
-      F = Array::Array(Op::func(Acast.constRealScalar<T>(),
+      F = Array(Op::func(Acast.constRealScalar<T>(),
 				Bcast.constRealScalar<T>()));
     } else {
       Acast.forceComplex(); Bcast.forceComplex();
-      F = Array::Array(Op::func(Acast.constRealScalar<T>(),
+      F = Array(Op::func(Acast.constRealScalar<T>(),
 				Acast.constImagScalar<T>(),
 				Bcast.constRealScalar<T>(),
 				Bcast.constImagScalar<T>()));
     }
   } else if (Acast.isScalar()) {
     if (Acast.allReal() && Bcast.allReal()) {
-      F = Array::Array(Bool,Bcast.dimensions());
+      F = Array(Bool,Bcast.dimensions());
       bool* ret = F.real<bool>().data();
       const T& Ap = Acast.constRealScalar<T>();
       const T* Bp = Bcast.constReal<T>().constData();
@@ -414,7 +414,7 @@
       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
     } else {
       Acast.forceComplex(); Bcast.forceComplex();
-      F = Array::Array(Bool,Bcast.dimensions());
+      F = Array(Bool,Bcast.dimensions());
       bool* ret = F.real<bool>().data();
       const T& Ar = Acast.constRealScalar<T>();
       const T& Ai = Acast.constImagScalar<T>();
@@ -425,7 +425,7 @@
     }
   } else if (Bcast.isScalar()) {
     if (Bcast.allReal() && Acast.allReal()) {
-      F = Array::Array(Bool,Acast.dimensions());
+      F = Array(Bool,Acast.dimensions());
       bool* ret = F.real<bool>().data();
       const T* Ap = Acast.constReal<T>().constData();
       const T& Bp = Bcast.constRealScalar<T>();
@@ -433,7 +433,7 @@
       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp);
     } else {
       Acast.forceComplex(); Bcast.forceComplex();
-      F = Array::Array(Bool,Acast.dimensions());
+      F = Array(Bool,Acast.dimensions());
       bool* ret = F.real<bool>().data();
       const T* Ar = Acast.constReal<T>().constData();
       const T* Ai = Acast.constImag<T>().constData();
@@ -446,7 +446,7 @@
     if (Acast.dimensions() != Bcast.dimensions())
       throw Exception("size mismatch in arguments to binary operator");
     if (Bcast.allReal() && Acast.allReal()) {
-      F = Array::Array(Bool,Acast.dimensions());
+      F = Array(Bool,Acast.dimensions());
       bool* ret = F.real<bool>().data();
       const T* Ap = Acast.constReal<T>().constData();
       const T* Bp = Bcast.constReal<T>().constData();
@@ -454,7 +454,7 @@
       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp[i]);
     } else {
       Acast.forceComplex(); Bcast.forceComplex();
-      F = Array::Array(Bool,Acast.dimensions());
+      F = Array(Bool,Acast.dimensions());
       bool* ret = F.real<bool>().data();
       const T* Ar = Acast.constReal<T>().constData();
       const T* Ai = Acast.constImag<T>().constData();
@@ -533,9 +533,9 @@
   if (!Acast.isScalar()) Acast = Acast.asDenseArray();
   if (Acast.isScalar()) {
     if (Acast.allReal()) {
-      F = Array::Array(Op::func(Acast.constRealScalar<T>()));
+      F = Array(Op::func(Acast.constRealScalar<T>()));
     } else {
-      F = Array::Array(T(0),T(0));
+      F = Array(T(0),T(0));
       Op::func(Acast.constRealScalar<T>(),
 	       Acast.constImagScalar<T>(),
 	       F.realScalar<T>(),F.imagScalar<T>());






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-05 16:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-05 16:11 [gentoo-commits] gentoo-x86 commit in sci-mathematics/freemat/files: freemat-4.0-gcc45.patch Sebastien Fabbro (bicatali)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox