diff --git a/Jamfile b/Jamfile
index 2d6f5389..09c5a9b6 100644
--- a/Jamfile
+++ b/Jamfile
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2000-2002
+# Joerg Walter, Mathias Koch
+#
+# Permission to use, copy, modify, distribute and sell this software
+# and its documentation for any purpose is hereby granted without fee,
+# provided that the above copyright notice appear in all copies and
+# that both that copyright notice and this permission notice appear
+# in supporting documentation. The authors make no representations
+# about the suitability of this software for any purpose.
+# It is provided "as is" without express or implied warranty.
+#
+# The authors gratefully acknowledge the support of
+# GeNeSys mbH & Co. KG in producing this work.
+#
+
subproject libs/numeric/ublas ;
subinclude libs/numeric/ublas/test1 ;
subinclude libs/numeric/ublas/test2 ;
diff --git a/bench1/Jamfile b/bench1/Jamfile
index e62332b9..7c6bb931 100644
--- a/bench1/Jamfile
+++ b/bench1/Jamfile
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2000-2002
+# Joerg Walter, Mathias Koch
+#
+# Permission to use, copy, modify, distribute and sell this software
+# and its documentation for any purpose is hereby granted without fee,
+# provided that the above copyright notice appear in all copies and
+# that both that copyright notice and this permission notice appear
+# in supporting documentation. The authors make no representations
+# about the suitability of this software for any purpose.
+# It is provided "as is" without express or implied warranty.
+#
+# The authors gratefully acknowledge the support of
+# GeNeSys mbH & Co. KG in producing this work.
+#
+
subproject libs/numeric/ublas/bench1 ;
SOURCES = bench1 bench11 bench12 bench13 ;
diff --git a/bench2/Jamfile b/bench2/Jamfile
index f3c17608..d0c2b0ea 100644
--- a/bench2/Jamfile
+++ b/bench2/Jamfile
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2000-2002
+# Joerg Walter, Mathias Koch
+#
+# Permission to use, copy, modify, distribute and sell this software
+# and its documentation for any purpose is hereby granted without fee,
+# provided that the above copyright notice appear in all copies and
+# that both that copyright notice and this permission notice appear
+# in supporting documentation. The authors make no representations
+# about the suitability of this software for any purpose.
+# It is provided "as is" without express or implied warranty.
+#
+# The authors gratefully acknowledge the support of
+# GeNeSys mbH & Co. KG in producing this work.
+#
+
subproject libs/numeric/ublas/bench2 ;
SOURCES = bench2 bench21 bench22 bench23 ;
diff --git a/bench3/Jamfile b/bench3/Jamfile
index b03a88dc..57a2c1b1 100644
--- a/bench3/Jamfile
+++ b/bench3/Jamfile
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2000-2002
+# Joerg Walter, Mathias Koch
+#
+# Permission to use, copy, modify, distribute and sell this software
+# and its documentation for any purpose is hereby granted without fee,
+# provided that the above copyright notice appear in all copies and
+# that both that copyright notice and this permission notice appear
+# in supporting documentation. The authors make no representations
+# about the suitability of this software for any purpose.
+# It is provided "as is" without express or implied warranty.
+#
+# The authors gratefully acknowledge the support of
+# GeNeSys mbH & Co. KG in producing this work.
+#
+
subproject libs/numeric/ublas/bench3 ;
SOURCES = bench3 bench31 bench32 bench33 ;
diff --git a/bench3/bench31.cpp b/bench3/bench31.cpp
index 47aba28d..6c2ada24 100644
--- a/bench3/bench31.cpp
+++ b/bench3/bench31.cpp
@@ -66,15 +66,9 @@ struct bench_my_inner_prod {
void operator () (int runs) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
- static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N));
-#else
static V v1 (N), v2 (N);
ublas::vector_range vr1 (v1, ublas::range (0, N)),
vr2 (v2, ublas::range (0, N));
-#endif
initialize_vector (vr1);
initialize_vector (vr2);
boost::timer t;
@@ -151,17 +145,10 @@ struct bench_my_vector_add {
void operator () (int runs, safe_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
- static V v1 (N), v2 (N), v3 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N)),
- vr3 (v2, ublas::range<> (0, N));
-#else
static V v1 (N), v2 (N), v3 (N);
ublas::vector_range vr1 (v1, ublas::range (0, N)),
vr2 (v2, ublas::range (0, N)),
vr3 (v2, ublas::range (0, N));
-#endif
initialize_vector (vr1);
initialize_vector (vr2);
initialize_vector (vr3);
@@ -181,17 +168,10 @@ struct bench_my_vector_add {
}
void operator () (int runs, fast_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
- static V v1 (N), v2 (N), v3 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N)),
- vr3 (v2, ublas::range<> (0, N));
-#else
static V v1 (N), v2 (N), v3 (N);
ublas::vector_range vr1 (v1, ublas::range (0, N)),
vr2 (v2, ublas::range (0, N)),
vr3 (v2, ublas::range (0, N));
-#endif
initialize_vector (vr1);
initialize_vector (vr2);
boost::timer t;
diff --git a/bench3/bench32.cpp b/bench3/bench32.cpp
index efbf1072..27b9741f 100644
--- a/bench3/bench32.cpp
+++ b/bench3/bench32.cpp
@@ -68,19 +68,11 @@ struct bench_my_outer_prod {
void operator () (int runs, safe_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
- static M m (N, N);
- ublas::matrix_range mr (m, ublas::range<> (0, N), ublas::range<> (0, N));
- static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N));
-#else
static M m (N, N);
ublas::matrix_range mr (m, ublas::range (0, N), ublas::range (0, N));
static V v1 (N), v2 (N);
ublas::vector_range vr1 (v1, ublas::range (0, N)),
vr2 (v2, ublas::range (0, N));
-#endif
initialize_vector (vr1);
initialize_vector (vr2);
boost::timer t;
@@ -99,19 +91,11 @@ struct bench_my_outer_prod {
}
void operator () (int runs, fast_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
- static M m (N, N);
- ublas::matrix_range mr (m, ublas::range<> (0, N), ublas::range<> (0, N));
- static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N));
-#else
static M m (N, N);
ublas::matrix_range mr (m, ublas::range (0, N), ublas::range (0, N));
static V v1 (N), v2 (N);
ublas::vector_range vr1 (v1, ublas::range (0, N)),
vr2 (v2, ublas::range (0, N));
-#endif
initialize_vector (vr1);
initialize_vector (vr2);
boost::timer t;
@@ -195,19 +179,11 @@ struct bench_my_matrix_vector_prod {
void operator () (int runs, safe_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
- static M m (N, N);
- ublas::matrix_range mr (m, ublas::range<> (0, N), ublas::range<> (0, N));
- static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N));
-#else
static M m (N, N);
ublas::matrix_range mr (m, ublas::range (0, N), ublas::range (0, N));
static V v1 (N), v2 (N);
ublas::vector_range vr1 (v1, ublas::range (0, N)),
vr2 (v2, ublas::range (0, N));
-#endif
initialize_matrix (mr);
initialize_vector (vr1);
boost::timer t;
@@ -226,19 +202,11 @@ struct bench_my_matrix_vector_prod {
}
void operator () (int runs, fast_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
- static M m (N, N);
- ublas::matrix_range mr (m, ublas::range<> (0, N), ublas::range<> (0, N));
- static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N));
-#else
static M m (N, N);
ublas::matrix_range mr (m, ublas::range (0, N), ublas::range (0, N));
static V v1 (N), v2 (N);
ublas::vector_range vr1 (v1, ublas::range (0, N)),
vr2 (v2, ublas::range (0, N));
-#endif
initialize_matrix (mr);
initialize_vector (vr1);
boost::timer t;
diff --git a/bench3/bench33.cpp b/bench3/bench33.cpp
index 6395be43..89154ae9 100644
--- a/bench3/bench33.cpp
+++ b/bench3/bench33.cpp
@@ -71,15 +71,9 @@ struct bench_my_matrix_prod {
void operator () (int runs, safe_tag) const {
try {
static M m1 (N, N), m2 (N, N), m3 (N, N);
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
- ublas::matrix_range mr1 (m1, ublas::range<> (0, N), ublas::range<> (0, N)),
- mr2 (m2, ublas::range<> (0, N), ublas::range<> (0, N)),
- mr3 (m3, ublas::range<> (0, N), ublas::range<> (0, N));
-#else
ublas::matrix_range mr1 (m1, ublas::range (0, N), ublas::range (0, N)),
mr2 (m2, ublas::range (0, N), ublas::range (0, N)),
mr3 (m3, ublas::range (0, N), ublas::range (0, N));
-#endif
initialize_matrix (mr1);
initialize_matrix (mr2);
boost::timer t;
@@ -99,15 +93,9 @@ struct bench_my_matrix_prod {
void operator () (int runs, fast_tag) const {
try {
static M m1 (N, N), m2 (N, N), m3 (N, N);
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
- ublas::matrix_range mr1 (m1, ublas::range<> (0, N), ublas::range<> (0, N)),
- mr2 (m2, ublas::range<> (0, N), ublas::range<> (0, N)),
- mr3 (m3, ublas::range<> (0, N), ublas::range<> (0, N));
-#else
ublas::matrix_range mr1 (m1, ublas::range (0, N), ublas::range (0, N)),
mr2 (m2, ublas::range (0, N), ublas::range (0, N)),
mr3 (m3, ublas::range (0, N), ublas::range (0, N));
-#endif
initialize_matrix (mr1);
initialize_matrix (mr2);
boost::timer t;
diff --git a/bench4/Jamfile b/bench4/Jamfile
index e720dcb7..c075f068 100644
--- a/bench4/Jamfile
+++ b/bench4/Jamfile
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2000-2002
+# Joerg Walter, Mathias Koch
+#
+# Permission to use, copy, modify, distribute and sell this software
+# and its documentation for any purpose is hereby granted without fee,
+# provided that the above copyright notice appear in all copies and
+# that both that copyright notice and this permission notice appear
+# in supporting documentation. The authors make no representations
+# about the suitability of this software for any purpose.
+# It is provided "as is" without express or implied warranty.
+#
+# The authors gratefully acknowledge the support of
+# GeNeSys mbH & Co. KG in producing this work.
+#
+
subproject libs/numeric/ublas/bench4 ;
SOURCES = bench4 bench41 bench42 bench43 ;
diff --git a/bench4/bench41.cpp b/bench4/bench41.cpp
index 4084272d..953973c3 100644
--- a/bench4/bench41.cpp
+++ b/bench4/bench41.cpp
@@ -69,21 +69,13 @@ struct bench_my_inner_prod {
void operator () (int runs) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N));
-#else
- static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range (0, N)),
- vr2 (v2, ublas::range (0, N));
-#endif
- initialize_vector (vr1);
- initialize_vector (vr2);
+ initialize_vector (v1);
+ initialize_vector (v2);
boost::timer t;
for (int i = 0; i < runs; ++ i) {
static value_type s (0);
- s = ublas::inner_prod (vr1, vr2);
+ s = ublas::inner_prod (v1, v2);
// sink_scalar (s);
}
footer () (N, N - 1, runs, t.elapsed ());
@@ -154,24 +146,13 @@ struct bench_my_vector_add {
void operator () (int runs, safe_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
static V v1 (N), v2 (N), v3 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N)),
- vr3 (v2, ublas::range<> (0, N));
-#else
- static V v1 (N), v2 (N), v3 (N);
- ublas::vector_range vr1 (v1, ublas::range (0, N)),
- vr2 (v2, ublas::range (0, N)),
- vr3 (v2, ublas::range (0, N));
-#endif
- initialize_vector (vr1);
- initialize_vector (vr2);
- initialize_vector (vr3);
+ initialize_vector (v1);
+ initialize_vector (v2);
boost::timer t;
for (int i = 0; i < runs; ++ i) {
- vr3 = - (vr1 + vr2);
-// sink_vector (vr3);
+ v3 = - (v1 + v2);
+// sink_vector (v3);
}
footer () (0, 2 * N, runs, t.elapsed ());
}
@@ -184,23 +165,13 @@ struct bench_my_vector_add {
}
void operator () (int runs, fast_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
static V v1 (N), v2 (N), v3 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N)),
- vr3 (v2, ublas::range<> (0, N));
-#else
- static V v1 (N), v2 (N), v3 (N);
- ublas::vector_range vr1 (v1, ublas::range (0, N)),
- vr2 (v2, ublas::range (0, N)),
- vr3 (v2, ublas::range (0, N));
-#endif
- initialize_vector (vr1);
- initialize_vector (vr2);
+ initialize_vector (v1);
+ initialize_vector (v2);
boost::timer t;
for (int i = 0; i < runs; ++ i) {
- vr3.assign (- (vr1 + vr2));
-// sink_vector (vr3);
+ v3.assign (- (v1 + v2));
+// sink_vector (v3);
}
footer () (0, 2 * N, runs, t.elapsed ());
}
diff --git a/bench4/bench42.cpp b/bench4/bench42.cpp
index caf398af..2c530621 100644
--- a/bench4/bench42.cpp
+++ b/bench4/bench42.cpp
@@ -71,25 +71,14 @@ struct bench_my_outer_prod {
void operator () (int runs, safe_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
static M m (N, N);
- ublas::matrix_range mr (m, ublas::range<> (0, N), ublas::range<> (0, N));
static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N));
-#else
- static M m (N, N);
- ublas::matrix_range mr (m, ublas::range (0, N), ublas::range (0, N));
- static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range (0, N)),
- vr2 (v2, ublas::range (0, N));
-#endif
- initialize_vector (vr1);
- initialize_vector (vr2);
+ initialize_vector (v1);
+ initialize_vector (v2);
boost::timer t;
for (int i = 0; i < runs; ++ i) {
- mr = - ublas::outer_prod (vr1, vr2);
-// sink_matrix (mr);
+ m = - ublas::outer_prod (v1, v2);
+// sink_matrix (m);
}
footer () (N * N, N * N, runs, t.elapsed ());
}
@@ -102,25 +91,14 @@ struct bench_my_outer_prod {
}
void operator () (int runs, fast_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
static M m (N, N);
- ublas::matrix_range mr (m, ublas::range<> (0, N), ublas::range<> (0, N));
static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N));
-#else
- static M m (N, N);
- ublas::matrix_range mr (m, ublas::range (0, N), ublas::range (0, N));
- static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range (0, N)),
- vr2 (v2, ublas::range (0, N));
-#endif
- initialize_vector (vr1);
- initialize_vector (vr2);
+ initialize_vector (v1);
+ initialize_vector (v2);
boost::timer t;
for (int i = 0; i < runs; ++ i) {
- mr.assign (- ublas::outer_prod (vr1, vr2));
-// sink_matrix (mr);
+ m.assign (- ublas::outer_prod (v1, v2));
+// sink_matrix (m);
}
footer () (N * N, N * N, runs, t.elapsed ());
}
@@ -198,25 +176,14 @@ struct bench_my_matrix_vector_prod {
void operator () (int runs, safe_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
static M m (N, N);
- ublas::matrix_range mr (m, ublas::range<> (0, N), ublas::range<> (0, N));
static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N));
-#else
- static M m (N, N);
- ublas::matrix_range mr (m, ublas::range (0, N), ublas::range (0, N));
- static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range (0, N)),
- vr2 (v2, ublas::range (0, N));
-#endif
- initialize_matrix (mr);
- initialize_vector (vr1);
+ initialize_matrix (m);
+ initialize_vector (v1);
boost::timer t;
for (int i = 0; i < runs; ++ i) {
- vr2 = ublas::prod (mr, vr1);
-// sink_vector (vr2);
+ v2 = ublas::prod (m, v1);
+// sink_vector (v2);
}
footer () (N * N, N * (N - 1), runs, t.elapsed ());
}
@@ -229,25 +196,14 @@ struct bench_my_matrix_vector_prod {
}
void operator () (int runs, fast_tag) const {
try {
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
static M m (N, N);
- ublas::matrix_range mr (m, ublas::range<> (0, N), ublas::range<> (0, N));
static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range<> (0, N)),
- vr2 (v2, ublas::range<> (0, N));
-#else
- static M m (N, N);
- ublas::matrix_range mr (m, ublas::range (0, N), ublas::range (0, N));
- static V v1 (N), v2 (N);
- ublas::vector_range vr1 (v1, ublas::range (0, N)),
- vr2 (v2, ublas::range (0, N));
-#endif
- initialize_matrix (mr);
- initialize_vector (vr1);
+ initialize_matrix (m);
+ initialize_vector (v1);
boost::timer t;
for (int i = 0; i < runs; ++ i) {
- vr2.assign (ublas::prod (mr, vr1));
-// sink_vector (vr2);
+ v2.assign (ublas::prod (m, v1));
+// sink_vector (v2);
}
footer () (N * N, N * (N - 1), runs, t.elapsed ());
}
diff --git a/bench4/bench43.cpp b/bench4/bench43.cpp
index 20bec0a4..2f0b0fcc 100644
--- a/bench4/bench43.cpp
+++ b/bench4/bench43.cpp
@@ -74,21 +74,12 @@ struct bench_my_matrix_prod {
void operator () (int runs, safe_tag) const {
try {
static M m1 (N, N), m2 (N, N), m3 (N, N);
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
- ublas::matrix_range mr1 (m1, ublas::range<> (0, N), ublas::range<> (0, N)),
- mr2 (m2, ublas::range<> (0, N), ublas::range<> (0, N)),
- mr3 (m3, ublas::range<> (0, N), ublas::range<> (0, N));
-#else
- ublas::matrix_range mr1 (m1, ublas::range (0, N), ublas::range (0, N)),
- mr2 (m2, ublas::range (0, N), ublas::range (0, N)),
- mr3 (m3, ublas::range (0, N), ublas::range (0, N));
-#endif
- initialize_matrix (mr1);
- initialize_matrix (mr2);
+ initialize_matrix (m1);
+ initialize_matrix (m2);
boost::timer t;
for (int i = 0; i < runs; ++ i) {
- mr3 = ublas::prod (mr1, mr2);
-// sink_matrix (mr3);
+ m3 = ublas::prod (m1, m2);
+// sink_matrix (m3);
}
footer () (N * N * N, N * N * (N - 1), runs, t.elapsed ());
}
@@ -102,21 +93,12 @@ struct bench_my_matrix_prod {
void operator () (int runs, fast_tag) const {
try {
static M m1 (N, N), m2 (N, N), m3 (N, N);
-#ifdef BOOST_UBLAS_ENABLE_INDEX_SET_ALL
- ublas::matrix_range mr1 (m1, ublas::range<> (0, N), ublas::range<> (0, N)),
- mr2 (m2, ublas::range<> (0, N), ublas::range<> (0, N)),
- mr3 (m3, ublas::range<> (0, N), ublas::range<> (0, N));
-#else
- ublas::matrix_range mr1 (m1, ublas::range (0, N), ublas::range (0, N)),
- mr2 (m2, ublas::range (0, N), ublas::range (0, N)),
- mr3 (m3, ublas::range (0, N), ublas::range (0, N));
-#endif
- initialize_matrix (mr1);
- initialize_matrix (mr2);
+ initialize_matrix (m1);
+ initialize_matrix (m2);
boost::timer t;
for (int i = 0; i < runs; ++ i) {
- mr3.assign (ublas::prod (mr1, mr2));
-// sink_matrix (mr3);
+ m3.assign (ublas::prod (m1, m2));
+// sink_matrix (m3);
}
footer () (N * N * N, N * N * (N - 1), runs, t.elapsed ());
}
diff --git a/doc/banded.htm b/doc/banded.htm
index 32cc9ead..812f1dda 100644
--- a/doc/banded.htm
+++ b/doc/banded.htm
@@ -598,7 +598,7 @@ provided this copyright notice appears in all copies. This document is provided
``as is'' without express or implied warranty, and with no claim as to its
suitability for any purpose.
-Last revised: 8/3/2002
+Last revised: 1/15/2003