Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59089 - sandbox/numeric_bindings/libs/numeric/bindings/atlas
From: rutger_at_[hidden]
Date: 2010-01-17 05:48:45


Author: rutger
Date: 2010-01-17 05:48:44 EST (Sun, 17 Jan 2010)
New Revision: 59089
URL: http://svn.boost.org/trac/boost/changeset/59089

Log:
ublas_vct now passes

Text files modified:
   sandbox/numeric_bindings/libs/numeric/bindings/atlas/ublas_vct.cc | 53 +++++++++++++++++++--------------------
   1 files changed, 26 insertions(+), 27 deletions(-)

Modified: sandbox/numeric_bindings/libs/numeric/bindings/atlas/ublas_vct.cc
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/atlas/ublas_vct.cc (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/atlas/ublas_vct.cc 2010-01-17 05:48:44 EST (Sun, 17 Jan 2010)
@@ -5,17 +5,16 @@
 //#define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
 
 #include <iostream>
-#include <boost/numeric/ublas/vector.hpp>
-#include <boost/numeric/ublas/vector_proxy.hpp>
-#include <boost/numeric/bindings/traits/ublas_vector.hpp>
-#include <boost/numeric/bindings/atlas/cblas1.hpp>
+#include <boost/numeric/bindings/ublas/vector_proxy.hpp>
+#include <boost/numeric/bindings/ublas/vector.hpp>
+#include <boost/numeric/bindings/blas/level1.hpp>
 #ifdef F_USE_STD_VECTOR
 #include <vector>
-#include <boost/numeric/bindings/traits/std_vector.hpp>
+#include <boost/numeric/bindings/std/vector.hpp>
 #endif
 #include "utils.h"
 
-namespace atlas = boost::numeric::bindings::atlas;
+namespace blas = boost::numeric::bindings::blas;
 namespace ublas = boost::numeric::ublas;
 
 using std::cout;
@@ -38,20 +37,20 @@
   init_v (v, times_plus<real_t> (0.1, 0.1));
   print_v (v, "v");
   vct_t vy (10);
- atlas::set (1., vy);
+ blas::set (1., vy);
   print_v (vy, "vy");
   cout << endl;
 
   // v <- 2 v
- atlas::scal (2.0, v);
+ blas::scal (2.0, v);
   print_v (v, "v <- 2 v");
 
   // vy <- 0.5 v + vy
- atlas::axpy (0.5, v, vy);
+ blas::axpy (0.5, v, vy);
   print_v (vy, "vy <- 0.5 v + vy");
 
   // v^T vy
- cout << "v vy = " << atlas::dot (v, vy) << endl;
+ cout << "v vy = " << blas::dot (v, vy) << endl;
   cout << endl;
 
   /////////////////
@@ -72,15 +71,15 @@
   print_v (vry, "vy[4..8]");
 
   // v[2..6] <- 0.1 v[2..6]
- atlas::scal (0.1, vr);
+ blas::scal (0.1, vr);
   print_v (v, "v[2..6] <- 0.1 v[2..6]");
 
   // vr^T vr
   // ublas::vector_range<vct_t const> cvr (v, ublas::range (2, 6));
- cout << "v[2..6] v[2..6] = " << atlas::dot (vr, vr) << endl;
+ cout << "v[2..6] v[2..6] = " << blas::dot (vr, vr) << endl;
 
   // vy[4..8] <- v[2..6] + vy[4..8]
- atlas::xpy (vr, vry);
+ blas::axpy (1.0, vr, vry);
   print_v (vy, "vy[4..8] <- v[2..6] + vy[4..8]");
   cout << endl;
 
@@ -102,14 +101,14 @@
   print_v (vsy, "vy[2:2:4]");
 
   // v[1:2:4] <- 10 v[1:2:4]
- atlas::scal (10.0, vs);
+ blas::scal (10.0, vs);
   print_v (v, "v[1:2:4] <- 10 v[1:2:4]");
 
   // vs^T vs
- cout << "v[1:2:4] v[1:2:4] = " << atlas::dot (vs, vs) << endl;
+ cout << "v[1:2:4] v[1:2:4] = " << blas::dot (vs, vs) << endl;
 
   // vy[2:2:4] <- 0.01 v[1:2:4] + vy[2:2:4]
- atlas::axpy (0.01, vs, vsy);
+ blas::axpy (0.01, vs, vsy);
   print_v (vy, "vy[2:2:4] <- 0.01 v[1:2:4] + vy[2:2:4]");
   cout << endl;
 
@@ -120,28 +119,28 @@
   init_v (v, times_plus<real_t> (0.1, 0.1));
   print_v (v, "v");
   // vy <- 1.0
- atlas::set (1., vy);
+ blas::set (1., vy);
   print_v (vy, "vy <- 1.0");
 
   // vy[2:2:4] <- 0.01 v[2..6] + vy[2:2:4]
- atlas::axpy (0.01, vr, vsy);
+ blas::axpy (0.01, vr, vsy);
   print_v (vy, "vy[2:2:4] <- 0.01 v[2..6] + vy[2:2:4]");
 
   // vy <- 1.0
- atlas::set (1., vy);
+ blas::set (1., vy);
   print_v (vy, "vy <- 1.0");
 
   // vy[4..8] <- 0.01 v[1:2:4] + vy[4..8]
- atlas::axpy (0.01, vs, vry);
+ blas::axpy (0.01, vs, vry);
   print_v (vy, "vy[4..8] <- 0.01 v[1:2:4] + vy[4..8]");
 
   // vr^T vs == vs^T vr
- cout << "v[2..6] v[1:2:4] = " << atlas::dot (vr, vs) << " == "
- << atlas::dot (vs, vr) << endl;
+ cout << "v[2..6] v[1:2:4] = " << blas::dot (vr, vs) << " == "
+ << blas::dot (vs, vr) << endl;
 
   // vr^T vsy == vsy^T vr
- cout << "v[2..6] vy[2:2:4] = " << atlas::dot (vr, vsy) << " == "
- << atlas::dot (vsy, vr) << endl;
+ cout << "v[2..6] vy[2:2:4] = " << blas::dot (vr, vsy) << " == "
+ << blas::dot (vsy, vr) << endl;
 
   cout << endl;
 
@@ -161,11 +160,11 @@
   print_v (vsr, "v[1..9][1:2:3]");
 
   // v[1..9][1:2:3] <- 0.1 v[1..9][1:2:3]
- atlas::scal (0.1, vsr);
+ blas::scal (0.1, vsr);
   print_v (v, "0.1 v[1..9][1:2:3]");
 
   // ||vsr||_2
- cout << "||v[1..9][1:2:3]||_2 = " << atlas::nrm2 (vsr) << endl;
+ cout << "||v[1..9][1:2:3]||_2 = " << blas::nrm2 (vsr) << endl;
   cout << endl;
 
   ///////////////////
@@ -184,7 +183,7 @@
   print_v (vrs, "v[0:2:5][1:4]");
 
   // v[0:2:5][1:4] <- 0.01 v[1..9][1:2:3] + v[0:2:5][1:4]
- atlas::axpy (0.01, vsr, vrs);
+ blas::axpy (0.01, vsr, vrs);
   print_v (vy, "0.01 v[1..9][1:2:3] + v[0:2:5][1:4]");
 
   cout << endl;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk