Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56248 - in trunk/libs/numeric/ublas: doc test/manual
From: guwi17_at_[hidden]
Date: 2009-09-16 18:00:39


Author: guwi17
Date: 2009-09-16 18:00:38 EDT (Wed, 16 Sep 2009)
New Revision: 56248
URL: http://svn.boost.org/trac/boost/changeset/56248

Log:
see #3457

 * test/manual/test_move_semantics.cpp: example and manual test case to demonstrate move semantics
 * test/manual/Jamfile.v2: added new target test_move_semantics
 * doc/ublas.css: added pre.screen class for code snippets, added p.credit class for thanks and credits
 * doc/overview.htm: fixed broken anchors and missing alt-attribute
 * doc/release_notes.htm: added new feature to release list
 * doc/options.htm: new page to document preprocessore switches (mostly copied from Wiki)
 * doc/index.htm: added link to options.htm

Added:
   trunk/libs/numeric/ublas/doc/options.htm (contents, props changed)
   trunk/libs/numeric/ublas/test/manual/test_move_semantics.cpp (contents, props changed)
Text files modified:
   trunk/libs/numeric/ublas/doc/index.htm | 7 +++++--
   trunk/libs/numeric/ublas/doc/overview.htm | 6 +++---
   trunk/libs/numeric/ublas/doc/release_notes.htm | 23 ++++++++++++++++++++---
   trunk/libs/numeric/ublas/doc/ublas.css | 14 +++++++++++++-
   trunk/libs/numeric/ublas/test/manual/Jamfile.v2 | 2 ++
   5 files changed, 43 insertions(+), 9 deletions(-)

Modified: trunk/libs/numeric/ublas/doc/index.htm
==============================================================================
--- trunk/libs/numeric/ublas/doc/index.htm (original)
+++ trunk/libs/numeric/ublas/doc/index.htm 2009-09-16 18:00:38 EDT (Wed, 16 Sep 2009)
@@ -3,13 +3,13 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org" />
-<!-- tidy options: -w 120 -asxhtml -clean --vertical-space yes -f index.htm.err -m index.htm -->
+<!-- tidy options: -w 120 -asxhtml -clean - - vertical-space yes -f index.htm.err -m index.htm -->
 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
 <link href="ublas.css" type="text/css" />
 <title>Boost Basic Linear Algebra</title>
 </head>
 <body>
-<h1><img src="../../../../boost.png" align="middle" /> Basic Linear Algebra</h1>
+<h1><img src="../../../../boost.png" align="middle" alt="logo"/> Basic Linear Algebra</h1>
 
 <p>uBLAS is a C++ template class library that provides BLAS level 1, 2, 3
 functionality for dense, packed and sparse matrices. The design and implementation unify mathematical notation via
@@ -45,6 +45,9 @@
 
 <li>Effective uBLAS and further information
 </li>
+
+<li>Macros and Preprocessor Options
+</li>
 </ul>
 </li>
 

Added: trunk/libs/numeric/ublas/doc/options.htm
==============================================================================
--- (empty file)
+++ trunk/libs/numeric/ublas/doc/options.htm 2009-09-16 18:00:38 EDT (Wed, 16 Sep 2009)
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
+<head>
+<meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org" />
+<!-- tidy options: -w 120 -asxhtml -clean - - vertical-space yes -f index.htm.err -m index.htm -->
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+<link rel="stylesheet" href="ublas.css" type="text/css" />
+<title>Boost Basic Linear Algebra - Configuration Options</title>
+</head>
+<body>
+<h1><img src="../../../../boost.png" align="middle" alt="logo"/>Boost Basic Linear Algebra - Configuration Options</h1>
+
+<div class="navigation">
+back to uBLAS home
+</div>
+
+<h2>NDEBUG</h2>
+
+<p><strong>Make sure you define NDEBUG</strong> The only way uBLAS
+knows you want a release configuration is to check if you have defined
+NDEBUG. If you don't it assumes you want a debug configuration and
+adds a lot of very useful runtime check. However these are very slow!
+</p>
+
+
+<h2>BOOST_UBLAS_MOVE_SEMANTICS</h2>
+
+<p class="credit">The patch and description was provided by Nasos Iliopoulos.</p>
+
+<p>
+An immediate effect of this define is the elimination of the need for
+noalias in types <tt>vector&lt;T&gt;</tt> and
+<tt>matrix&lt;T&gt;</tt>, when assigned to the same type. Although
+this patch implements move semantics for bounded_ and c_ (vector and
+matrix) types, they don't have any effect at those types, due to their
+underlying storage. I included it for possible future exploitation.
+</p>
+
+<p>
+In the <a href="../test/manual/test_move_semantics.cpp">test
+example</a> two tests are defined, one for vectors and one for
+matrices. The aim of this example is to print the pointers of the
+storage of each of the containers, before and after the assignment to
+a temporary object. When move semantics are enabled, the
+<tt>vector&lt;T&gt;</tt> and <tt>matrix&lt;T&gt;</tt> storage is moved
+from the temporary and no copy is performed.
+</p>
+
+<p>
+If move semantics are supported by your compiler you will get an output like the following:
+</p>
+<pre class="screen">
+matrix&lt;double&gt; --------------------------------------------------------------------
+Temporary pointer r: 0x94790c0
+Pointer (must be equal to temp. pointer if move semantics are enabled) : 0x94790c0
+</pre>
+
+<p>Notes:</p>
+<ul>
+<li>It should be no surprise to see matrices and vectors been passed
+by VALUE, the compiler takes care and either moves (if the underlying
+code does not modify the object), or copies (if the underlying code
+modifies the object).
+</li>
+<li>There might be some space for some improvements (like clearing the
+data, before swaping)
+</li>
+<li>Move semantics don't eliminate temporaries. They rather move their
+storage around so no copies are performed.
+</li>
+<li>MSVC does no implement Named Return Value Optimization in debug
+mode. So if you build in debug with this compiler you might get <a
+href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=483229"
+target="_blank">different behaviour</a> than a release build.
+</li>
+<li>Enabling move semantics is done via #define BOOST_UBLAS_MOVE_SEMANTICS.
+</li>
+<li>There is plenty of room for optimizations when c++0x standard is
+out, taking advantage of rvalue references. (I have a sweet vector
+implementation using that).
+</li>
+<li>If you enable move semantics and your compiler does not support
+them, the operation will just be as passing by const reference.
+</li>
+</ul>
+
+<p>Interesting links</p>
+<ul>
+<li> Want Speed? Pass by Value.
+</li>
+<li> Rvalue References: C++0x Features in VC10, Part 2
+</li>
+<li> Move It With Rvalue References
+</li>
+</ul>
+
+<h2>BOOST_UBLAS_CHECK_ENABLE</h2>
+
+<p>When BOOST_UBLAS_CHECK_ENABLE is defined then all index and
+parameter checks are enabled. This is enabled in debug mode and
+disabled in release mode.
+</p>
+
+<h2>BOOST_UBLAS_TYPE_CHECK</h2>
+
+<p>When BOOST_UBLAS_TYPE_CHECK is enabled then all possibly expensive
+structure checks are enabled. If this is not desireable then use
+<tt>#define BOOST_UBLAS_TYPE_CHECK 0</tt> before including any uBLAS
+header. The define BOOST_UBLAS_TYPE_CHECK_EPSILON can be used to
+control the acceptable tolerance, see
+<tt>detail/matrix_assign.hpp</tt> for implementation details of this
+check.
+</p>
+
+<h2>BOOST_UBLAS_USE_LONG_DOUBLE</h2>
+
+<p>Enable uBLAS expressions that involve containers of 'long double'</p>
+
+<h2>BOOST_UBLAS_USE_INTERVAL</h2>
+
+<p>Enable uBLAS expressions that involve containers of 'boost::numeric::interval' types</p>
+
+<h2>Configuring uBLAS with Macros</h2>
+
+<p>Many macro's appear in ublas/config.hpp and elsewhere. Hopefully in the future some of these will disappear!
+They fall into 4 groups:
+</p>
+<ul>
+<li> Automatically set by 'boost/numeric/ublas/config.hpp' based on
+NDEBUG. Makes the distinction between debug (safe) and release (fast)
+mode. Similar to STLport
+<ul>
+<li> <i>Release</i> mode (NDEBUG defined)
+<ul>
+<li> BOOST_UBLAS_INLINE <i>Compiler dependant definition to control
+function inlining.</i> </li><li> BOOST_UBLAS_USE_FAST_SAME </li></ul>
+</li><li> <i>Debug</i> mode
+<ul>
+<li> BOOST_UBLAS_CHECK_ENABLE <i>Enable checking of indexs, iterators
+and parameters. Prevents out of bound access etc.</i> </li><li>
+BOOST_UBLAS_TYPE_CHECK <i>Enable additional checks for the results of
+expressions using non dense types. Picks up runtime error such as the
+assignment of a numerically non-symmetric matrix to
+symmertic_matrix. Use <tt>#define BOOST_UBLAS_TYPE_CHECK 0</tt> to
+disable expensive numeric type checks.</i> (Note: "structure check"
+would be a much better name.) </li><li>
+BOOST_UBLAS_TYPE_CHECK_EPSILON <i>default: sqrt(epsilon), controls how
+large the difference between the expected result and the computed
+result may become. Increase this value if you are going to use near
+singular or badly scaled matrices. Please, refer to
+<tt>detail/matrix_assign.hpp</tt> for implementation of these type
+checks.</i> </li></ul> </li></ul>
+</li>
+<li> Automatically set by 'boost/numeric/ublas/config.hpp' based on
+compiler and boost/config.hpp macro's. Augments the compiler
+deficiency workarounds already supplied by boost/config.hpp
+<ul>
+<li> BOOST_UBLAS_NO_NESTED_CLASS_RELATION <i>A particularly nasty
+problem with VC7.1 Requires that uBLAS and the user use begin(it)
+rather then it.begin()</i> </li><li> BOOST_UBLAS_NO_SMART_PROXIES
+<i>Disable the automatic propagation of 'constantness' to
+proxies. Smart proxies automatically determine if the underling
+container they reference is constant or not. They adjust there
+definition of iterators and container access to reflect this
+constantness.</i> </li></ul>
+</li>
+<li> For use by uBLAS authors to test implementation methods. Preset
+in config.hpp
+<ul>
+<li> BOOST_UBLAS_USE_INVARIANT_HOISTING </li><li>
+BOOST_UBLAS_USE_INDEXING </li><li> BOOST_UBLAS_USE_INDEXED_ITERATOR
+</li><li> BOOST_UBLAS_NON_CONFORMANT_PROXIES <i>Gappy containers may
+be non-conformant, that is contain elements at different
+indices. Assigning between proxies (vector ranges for example) of
+these containers is difficult as the LHS may need insert new
+elements. This is slow.</i> </li><li> BOOST_UBLAS_USE_DUFF_DEVICE
+<i>Near useless on all platforms (see GCC's -funroll-loops)</i>
+
+</li></ul>
+</li>
+<li> User options. Can be predefined by user before including any
+uBLAS headers. They may also be automatically defined for some
+compilers to work around compile bugs.
+<ul>
+<li> BOOST_UBLAS_USE_LONG_DOUBLE <i>Enable uBLAS expressions that
+involve containers of 'long double'</i> </li><li>
+BOOST_UBLAS_USE_INTERVAL <i>Enable uBLAS expressions that involve
+containers of 'boost::numeric::interval' types</i> </li><li>
+BOOST_UBLAS_SIMPLE_ET_DEBUG <i>In order to simplify debugging is is
+possible to simplify expression templateso they are restricted to a
+single operation</i>
+
+</li><li> BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS <i> enable automatic
+conversion from proxy class to matrix expression </i> </li><li>
+BOOST_UBLAS_NO_ELEMENT_PROXIES <i>Disables the use of element proxies
+for gappy types.</i> </li><li> <i>The Gappy types (sparse, coordinate,
+compressed) store non-zero elements in their own containers. When new
+non-zero elements are assigned they must rearrange these
+containers. This invalidates references, iterators or pointers to
+these elements. This can happen at some surprising times such as the
+expression "a [1] = a [0] = 1;". Element proxies guarantee all such
+expressions will work as expected. However they bring their own
+restrictions and efficiency problems. For example as of Boost 1.30.0
+they prevent the assignment of elements between different types.</i>
+</li>
+<li> BOOST_UBLAS_REFERENCE_CONST_MEMBER <i>Enable to allow refernces
+to be returned to fixed (zero or one) elements of triangular or banded
+matrices</i>
+
+</li><li> BOOST_UBLAS_NO_EXCEPTIONS <i>Disable the use exceptions of
+uBLAS internal checks and error conditions. BOOST_NO_EXCEPTIONS has
+same effect.</i>
+</li>
+<li> BOOST_UBLAS_SINGULAR_CHECK <i>Check the for singularity in triangular solve() functions</i></li>
+</ul>
+</li>
+</ul>
+
+<hr />
+<div id="copyright">
+ <p>Copyright (&copy;) 2000-2009 Joerg Walter, Mathias Koch, Gunter Winkler<br />
+ Use, modification and distribution are subject to the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">
+ http://www.boost.org/LICENSE_1_0.txt
+ </a>).
+ </p>
+</div>
+<div id="revision">
+<p>
+<!-- Created: Wed Sep 16 21:19:20 CEST 2009 -->
+<!-- hhmts start -->
+Last modified: Wed Sep 16 23:16:45 CEST 2009
+<!-- hhmts end -->
+</p>
+</div>
+</body>
+</html>

Modified: trunk/libs/numeric/ublas/doc/overview.htm
==============================================================================
--- trunk/libs/numeric/ublas/doc/overview.htm (original)
+++ trunk/libs/numeric/ublas/doc/overview.htm 2009-09-16 18:00:38 EDT (Wed, 16 Sep 2009)
@@ -10,9 +10,9 @@
 <title>uBLAS Overview</title>
 </head>
 <body>
-<h1><img src="../../../../boost.png" align="middle" />
+<h1><img src="../../../../boost.png" align="middle" alt="logo"/>
 uBLAS Overview</h1>
-<h2><a name="rationale" id="rationale">Rationale</h2>
+<h2><a name="rationale" id="rationale" />Rationale</h2>
 <p><cite>It would be nice if every kind of numeric software could
 be written in C++ without loss of efficiency, but unless something
 can be found that achieves this without compromising the C++ type
@@ -264,7 +264,7 @@
 controlled by the <code>NDEBUG</code> preprocessor symbol of
 <code>&lt;cassert&gt;</code>.</p>
 
-<h2><a name="functionality" id="functionality">Functionality</h2>
+<h2><a name="functionality" id="functionality"/>Functionality</h2>
 
 <p>Every C++ library supporting linear algebra will be measured
 against the long-standing Fortran package BLAS. We now describe how

Modified: trunk/libs/numeric/ublas/doc/release_notes.htm
==============================================================================
--- trunk/libs/numeric/ublas/doc/release_notes.htm (original)
+++ trunk/libs/numeric/ublas/doc/release_notes.htm 2009-09-16 18:00:38 EDT (Wed, 16 Sep 2009)
@@ -2,15 +2,32 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org" />
-<!-- tidy options: -w 120 -asxhtml -clean --vertical-space yes -f index.htm.err -m index.htm -->
+<!-- tidy options: -w 120 -asxhtml -clean - - vertical-space yes -f index.htm.err -m index.htm -->
 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
 <link href="ublas.css" type="text/css" />
 <title>Boost Basic Linear Algebra - Release Notes</title>
 </head>
 <body>
-<h1><img src="../../../../boost.png" align="middle" /> Boost Basic Linear Algebra - Release Notes</h1>
+<h1><img src="../../../../boost.png" align="middle" alt="logo"/>Boost Basic Linear Algebra - Release Notes</h1>
+
+<div class="navigation">
+back to uBLAS home
+</div>
 
 <h2>Release 1.41.1</h2>
+
+<h3>new features</h3>
+
+<ul>
+<li>Move semantics of vector/matrix container assignments have been
+implemented. They can be enabled by setting
+BOOST_UBLAS_MOVE_SEMANTICS. More details are on the <a
+href="options.htm">preprocessor options page</a>.
+</li>
+</ul>
+
+<h3>bug fixes</h3>
+
 <ul>
 <li>[3293]Fix resizing problem in <code>identity_matrix</code>
 </li>
@@ -30,7 +47,7 @@
 </p>
 <!-- Created: Sun Sep 13 00:57:13 CEST 2009 -->
 <!-- hhmts start -->
-Last modified: Sun Sep 13 01:04:23 CEST 2009
+Last modified: Wed Sep 16 23:18:50 CEST 2009
 <!-- hhmts end -->
   </body>
 </html>

Modified: trunk/libs/numeric/ublas/doc/ublas.css
==============================================================================
--- trunk/libs/numeric/ublas/doc/ublas.css (original)
+++ trunk/libs/numeric/ublas/doc/ublas.css 2009-09-16 18:00:38 EDT (Wed, 16 Sep 2009)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2004 Michael Stevens, Mathias Koch,
+ * Copyright 2000-2009 Michael Stevens, Mathias Koch,
  * Joerg Walter, Gunter Winkler.
  *
  * Use, modification and distribution are subject to the
@@ -23,3 +23,15 @@
 th {
   text-align:left;
 }
+
+pre.screen {
+ border:1px solid #DCDCDC;
+ display:block;
+ font-size:9pt;
+ margin:1pc 4% 0;
+ padding:0.5pc;
+}
+
+p.credit {
+ font-style: italic;
+}

Modified: trunk/libs/numeric/ublas/test/manual/Jamfile.v2
==============================================================================
--- trunk/libs/numeric/ublas/test/manual/Jamfile.v2 (original)
+++ trunk/libs/numeric/ublas/test/manual/Jamfile.v2 2009-09-16 18:00:38 EDT (Wed, 16 Sep 2009)
@@ -4,3 +4,5 @@
 # LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 exe sp_resize : sp_resize.cpp ;
+
+exe test_move_semantics : test_move_semantics.cpp ;

Added: trunk/libs/numeric/ublas/test/manual/test_move_semantics.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/numeric/ublas/test/manual/test_move_semantics.cpp 2009-09-16 18:00:38 EDT (Wed, 16 Sep 2009)
@@ -0,0 +1,127 @@
+/** test move semantics - run with and without BOOST_UBLAS_MOVE_SEMANTICS defined */
+
+// Copyright Nasos Iliopoulos, Gunter Winkler 2009.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_UBLAS_MOVE_SEMANTICS
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+#include <boost/numeric/ublas/io.hpp>
+
+namespace ublas= boost::numeric::ublas;
+std::vector<double> a;
+
+ublas::vector<double> doubleit(ublas::vector<double> m)
+{
+ ublas::vector<double> r;
+ r=2.0*m;
+ std::cout << "Temporary pointer: " << &r[0] << std::endl;
+ return r;
+}
+template <class T,size_t N>
+ublas::bounded_vector<T,N > doubleit(ublas::bounded_vector<T, N> m)
+{
+ ublas::bounded_vector<T,N> r;
+ r=2.0*m;
+ std::cout << "Temporary pointer: " << &r[0] << std::endl;
+ return r;
+}
+
+template <class T,size_t N>
+ublas::c_vector<T,N > doubleit(ublas::c_vector<T, N> m)
+{
+ ublas::c_vector<T,N> r;
+ r=2.0*m;
+ std::cout << "Temporary pointer: " << &r[0] << std::endl;
+ return r;
+}
+
+ublas::matrix<double> doubleit(ublas::matrix<double> m)
+{
+ ublas::matrix<double> r;
+ r=2.0*m;
+ std::cout << "Temporary pointer r: " << &r(0,0) << std::endl;
+ return r;
+}
+template <class T,size_t N, size_t M>
+ublas::bounded_matrix<T,N, M > doubleit(ublas::bounded_matrix<T, N, M> m)
+{
+ ublas::bounded_matrix<T,N, M> r;
+ r=2.0*m;
+ std::cout << "Temporary pointer: " << &(r(0,0)) << std::endl;
+ return r;
+}
+
+template <class T,size_t N, size_t M>
+ublas::c_matrix<T,N, M > doubleit(ublas::c_matrix<T, N, M> m)
+{
+ ublas::c_matrix<T,N, M> r;
+ r=2.0*m;
+ std::cout << "Temporary pointer: " << &(r(0,0)) << std::endl;
+ return r;
+}
+
+
+void test1()
+{
+ std::cout << "vector<double> --------------------------------------------------------------------" << std::endl;
+ ublas::vector<double> a(ublas::scalar_vector<double>(2,2.0));
+ a = doubleit(a);
+ std::cout << "Pointer (must be equal to temp. pointer if move semantics are enabled) : " << &a[0] << std::endl;
+
+ std::cout << a << std::endl;
+
+ std::cout << "bounded_vector<double,2> --------------------------------------------------------------------" << std::endl;
+ ublas::bounded_vector<double,2> b(ublas::scalar_vector<double>(2,2.0));
+ ublas::bounded_vector<double,2> c;
+ noalias(c)=doubleit(b);
+ std::cout << "Pointer (bounded_vector swaps by copy this should be different than temp. pointer) : " << &c[0] << std::endl;
+ c(1)=0.0;
+ std::cout << b << std::endl;
+ std::cout << c << std::endl;
+
+ std::cout << "c_vector<double,2> --------------------------------------------------------------------" << std::endl;
+ ublas::c_vector<double,2> e=ublas::scalar_vector<double>(2,2.0);
+ ublas::c_vector<double,2> f;
+ f=doubleit(e);
+ std::cout << "Pointer (c_vector swaps by copy this should be different than temp. pointer) : " << &f[0] << std::endl;
+ f(1)=0;
+ std::cout << e << std::endl;
+ std::cout << f << std::endl;
+
+}
+
+void test2() {
+ std::cout << "matrix<double> --------------------------------------------------------------------" << std::endl;
+ ublas::matrix<double> a(ublas::scalar_matrix<double>(2, 3, 2.0));
+ a = doubleit(a);
+ std::cout << "Pointer (must be equal to temp. pointer if move semantics are enabled) : " << &(a(0,0)) << std::endl;
+ std::cout << a << std::endl;
+
+ std::cout << "bounded_matrix<double,2, 3> --------------------------------------------------------------------" << std::endl;
+ ublas::bounded_matrix<double,2, 3> b(ublas::scalar_matrix<double>(2,3, 2.0));
+ ublas::bounded_matrix<double,2, 3> c;
+ noalias(c)=doubleit(b);
+ std::cout << "Pointer (bounded_matrix swaps by copy this should be different than temp. pointer) : " << &(c(0,0)) << std::endl;
+ c(1,1)=0.0;
+ std::cout << b << std::endl;
+ std::cout << c << std::endl;
+
+ std::cout << "c_matrix<double,2 ,3> --------------------------------------------------------------------" << std::endl;
+ ublas::c_matrix<double,2, 3> e=ublas::scalar_matrix<double>(2,3, 2.0);
+ ublas::c_matrix<double,2, 3> f;
+ f=doubleit(e);
+ std::cout << "Pointer (c_matrix swaps by copy this should be different than temp. pointer) : " << &(f(0,0)) << std::endl;
+ f(1,1)=0;
+ std::cout << e << std::endl;
+ std::cout << f << std::endl;
+}
+
+int main(){
+ test1();
+ test2();
+ return 0;
+}
+


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