<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-14207</id>
	<title>Nabble - Boost - glas</title>
	<updated>2009-11-19T13:29:19Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Boost---glas-f14207.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Boost---glas-f14207.html" />
	<subtitle type="html">Generic Linear Algorithm Software</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26434424</id>
	<title>Re: linear solver</title>
	<published>2009-11-19T13:29:19Z</published>
	<updated>2009-11-19T13:29:19Z</updated>
	<author>
		<name>Gunter Winkler</name>
	</author>
	<content type="html">Gu Shiyuan schrieb:
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I need to solve a linear system. I check the uBLAS, but it seems
&lt;br&gt;&amp;gt; that it only has a triangular solver. Can uBLAS handle a general
&lt;br&gt;&amp;gt; linear system? Can uBLAS work with other linear package?(Like LAPACK).
&lt;br&gt;&amp;gt; I am using MSVC++ 2008.
&lt;br&gt;Please have a look at
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://mathema.tician.de/software/boost-bindings&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mathema.tician.de/software/boost-bindings&lt;/a&gt;&lt;br&gt;&lt;br&gt;mfg
&lt;br&gt;Gunter
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26434424&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/linear-solver-tp26420042p26434424.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26420042</id>
	<title>linear solver</title>
	<published>2009-11-18T19:56:56Z</published>
	<updated>2009-11-18T19:56:56Z</updated>
	<author>
		<name>Gu Shiyuan</name>
	</author>
	<content type="html">&lt;div&gt;Hello, &lt;/div&gt;
&lt;div&gt;    I need to solve a linear system. I check the uBLAS, but it seems that it only has a triangular solver. Can uBLAS handle a general linear system? Can uBLAS work with other linear package?(Like LAPACK). I am using MSVC++ 2008. Thank you.   &lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26420042&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/linear-solver-tp26420042p26420042.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23465341</id>
	<title>Default Ctor for Dense Vector</title>
	<published>2009-05-09T15:32:28Z</published>
	<updated>2009-05-09T15:32:28Z</updated>
	<author>
		<name>Laurent Plagne</name>
	</author>
	<content type="html">Hello, &lt;br&gt;&lt;br&gt;it looks that there is no default Ctor for dense vectors... &lt;br&gt;Is it a strong design decision ?&lt;br&gt;&lt;br&gt;In addition, I try to use the resize method on a dense vector and it looks to have no effect.&lt;br&gt;I guess that I missed something but.. what ?&lt;br&gt;

&lt;br&gt;Thank you for your help,&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;Laurent&lt;/font&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=23465341&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Default-Ctor-for-Dense-Vector-tp23465341p23465341.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-22096515</id>
	<title>Re: Using the build system</title>
	<published>2009-02-19T01:10:59Z</published>
	<updated>2009-02-19T01:10:59Z</updated>
	<author>
		<name>Thomas Klimpel-2</name>
	</author>
	<content type="html">Rob wrote:
&lt;br&gt;&amp;gt; I can't seem to find a simple tutorial on how to build glas. &amp;nbsp;The custom
&lt;br&gt;&amp;gt; build system seems a bit strange to me, and I was wondering if someone
&lt;br&gt;&amp;gt; might point me in the right direction.
&lt;br&gt;&lt;br&gt;How about &lt;a href=&quot;http://www.cs.kuleuven.be/~karlm/glas/doc/build.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cs.kuleuven.be/~karlm/glas/doc/build.html&lt;/a&gt;?
&lt;br&gt;&lt;br&gt;The same can also be found in the svn repository under
&lt;br&gt;trunk/glas/doc/build.html.
&lt;br&gt;&lt;br&gt;It worked for me under ubuntu. I didn't try to get it to work under cygwin, but I guess this should also be possible.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Thomas
&lt;br&gt;-- 
&lt;br&gt;&amp;quot;Der Pessimist behauptet, dass alles schon so schlimm ist,
&lt;br&gt;&amp;nbsp;dass es gar nicht mehr schlimmer sein könnte.
&lt;br&gt;&amp;nbsp;Worauf der Optimist erwidert: Oh doch!&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Vladimir Bukowsky
&lt;br&gt;&lt;br&gt;&lt;br&gt;Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL 
&lt;br&gt;für nur 17,95 Euro/mtl.!* &lt;a href=&quot;http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=22096515&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Using-the-build-system-tp22094302p22096515.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-22094302</id>
	<title>Using the build system</title>
	<published>2009-02-18T21:37:25Z</published>
	<updated>2009-02-18T21:37:25Z</updated>
	<author>
		<name>nomad421</name>
	</author>
	<content type="html">I can't seem to find a simple tutorial on how to build glas. &amp;nbsp;The custom
&lt;br&gt;build system seems a bit strange to me, and I was wondering if someone
&lt;br&gt;might point me in the right direction.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Rob
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=22094302&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Using-the-build-system-tp22094302p22094302.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-14913959</id>
	<title>reference manual</title>
	<published>2008-01-16T23:58:54Z</published>
	<updated>2008-01-16T23:58:54Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">Dear all,
&lt;br&gt;&lt;br&gt;Since several collegues are working on toolboxes in glas, I started 
&lt;br&gt;building a reference manual. See the usual place
&lt;br&gt;&lt;a href=&quot;http://www.cs.kuleuven.be/~karlm/glas/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cs.kuleuven.be/~karlm/glas/&lt;/a&gt;&lt;br&gt;or the svn repository on sourceforge in the doc directory.
&lt;br&gt;&lt;br&gt;In the meantime I have not finished writing up the general ideas of the 
&lt;br&gt;current concepts, phylosophy, implementation, etc.
&lt;br&gt;&lt;br&gt;Best wishes for 2008!
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[Karl.Meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U. Leuven;Department of Computer Science
&lt;br&gt;adr:Room 02.014;;Celestijnenlaan 200A;Heverlee (Leuven);;B-3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=14913959&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;tel;cell:+32 474 26 66 59
&lt;br&gt;note:http://www.kuleuven.be/cwis/email_disclaimer.htm
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=14913959&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/reference-manual-tp14913959p14913959.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-14027597</id>
	<title>Re: multi-dimensional arrays?</title>
	<published>2007-11-29T07:03:33Z</published>
	<updated>2007-11-29T07:03:33Z</updated>
	<author>
		<name>Edwards, Harold C</name>
	</author>
	<content type="html">&lt;br&gt;Some of our applications make complex use of multidimensional arrays,
&lt;br&gt;for example the derivatives of a collection of tensors associated with
&lt;br&gt;the Cartesian product of basis functions and quadrature points in a
&lt;br&gt;hexahedral cell. &amp;nbsp;One of the big software problems has been keeping up
&lt;br&gt;with the array layout, i.e. the meaning of each dimension. &amp;nbsp;The problem
&lt;br&gt;of permuting indices periodically pops up due to poor documentation, and
&lt;br&gt;the use of raw pointers.
&lt;br&gt;&lt;br&gt;A solution we came up with to address the multidimensional array
&lt;br&gt;notation in C++ as well as using C++ typing to encourage documentation
&lt;br&gt;of the arrays was the following array class.
&lt;br&gt;&lt;br&gt;template&amp;lt; typename Scalar, 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class TagDim1, class TagDim2, ... , class TagDim8 = TagIgnore&amp;gt;
&lt;br&gt;class Array ;
&lt;br&gt;&lt;br&gt;Where the 'dimension tags' are things like:
&lt;br&gt;&lt;br&gt;class CartesianVectorTag {};
&lt;br&gt;class BasisFunctionTag {};
&lt;br&gt;class QuadraturePointTag {};
&lt;br&gt;&lt;br&gt;Leading to &amp;quot;modestly typed&amp;quot; multidimensional arrays:
&lt;br&gt;&lt;br&gt;typedef
&lt;br&gt;Array&amp;lt;double,CartesianVectorTag,BasisFunctionTag,QuadraturePointTag&amp;gt;
&lt;br&gt;ElementGradients ;
&lt;br&gt;&lt;br&gt;The Array template class provided dimensions and the expected indexing
&lt;br&gt;operators.
&lt;br&gt;&lt;br&gt;Carter Edwards
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=14027597&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=14027597&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas-bounces@...&lt;/a&gt;]
&lt;br&gt;On Behalf Of Karl Meerbergen
&lt;br&gt;Sent: Thursday, November 29, 2007 1:20 AM
&lt;br&gt;To: Generic Linear Algorithm Software
&lt;br&gt;Subject: Re: [glas] multi-dimensional arrays?
&lt;br&gt;&lt;br&gt;Dear Neal,
&lt;br&gt;&lt;br&gt;I think we could add multi-dimensional arrays to glas. Could you make a
&lt;br&gt;list of desired functionaties?
&lt;br&gt;&lt;br&gt;As a coincidence I attended a seminar yesterday on higher order tensors.
&lt;br&gt;&lt;br&gt;The notation and concepts from this community could help.
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Neal Becker wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;On Wednesday 28 November 2007, Evgenii Rudnyi wrote:
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;I'm enthusiastically following mtl4 and glas developments.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;One thing that
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;neither seems to address is arrays of dimension &amp;gt;2. &amp;nbsp;Is this true?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;NumPy supports multidimensional arrays:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&lt;a href=&quot;http://www.scipy.org/NumPy&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.scipy.org/NumPy&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Yes it does. &amp;nbsp;Unfortunately, it doesn't have a nice c++ interface,
&lt;/div&gt;AFAIK.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;What I'd like is to be able to write generic algorithms in c++ that can
&lt;br&gt;&lt;br&gt;&amp;gt;use various multi-dimensional containers, and then expose them to
&lt;br&gt;python.
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;So far, what I've done is expose various container types to python 
&lt;br&gt;&amp;gt;(ublas,
&lt;br&gt;&amp;gt;blitz++) using boost::python. &amp;nbsp;Then, instantiate algorithms using these
&lt;br&gt;&amp;gt;containers to expose to python.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Each lib has it's own issues. &amp;nbsp;ublas, for example, doesn't conform to 
&lt;br&gt;&amp;gt;all of container concept (lacks constructor taking a pair of 
&lt;br&gt;&amp;gt;iterators), but that's pretty easy to work around.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;blitz takes a little work, because it lacks proper iterators. &amp;nbsp;I have 
&lt;br&gt;&amp;gt;built boost::iterator adapters that handle that (perhaps not
&lt;/div&gt;efficiently, though).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I don't know how to use numpy to get a nice generic interface on the
&lt;br&gt;c++ side.
&lt;br&gt;&amp;gt;_______________________________________________
&lt;br&gt;&amp;gt;glas mailing list
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=14027597&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=14027597&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-crossposting--glas-and-mtl4---what-are-the-commons-and-differences-tp13744771p14027597.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-14021243</id>
	<title>Re: multi-dimensional arrays?</title>
	<published>2007-11-29T00:20:27Z</published>
	<updated>2007-11-29T00:20:27Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">Dear Neal,
&lt;br&gt;&lt;br&gt;I think we could add multi-dimensional arrays to glas. Could you make a 
&lt;br&gt;list of desired functionaties?
&lt;br&gt;&lt;br&gt;As a coincidence I attended a seminar yesterday on higher order tensors. 
&lt;br&gt;The notation and concepts from this community could help.
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Neal Becker wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;On Wednesday 28 November 2007, Evgenii Rudnyi wrote:
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;I'm enthusiastically following mtl4 and glas developments.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;One thing that
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;neither seems to address is arrays of dimension &amp;gt;2. &amp;nbsp;Is this true?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;NumPy supports multidimensional arrays:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&lt;a href=&quot;http://www.scipy.org/NumPy&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.scipy.org/NumPy&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Yes it does. &amp;nbsp;Unfortunately, it doesn't have a nice c++ interface, AFAIK.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;What I'd like is to be able to write generic algorithms in c++ that can use 
&lt;br&gt;&amp;gt;various multi-dimensional containers, and then expose them to python.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;So far, what I've done is expose various container types to python (ublas, 
&lt;br&gt;&amp;gt;blitz++) using boost::python. &amp;nbsp;Then, instantiate algorithms using these 
&lt;br&gt;&amp;gt;containers to expose to python.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Each lib has it's own issues. &amp;nbsp;ublas, for example, doesn't conform to all of 
&lt;br&gt;&amp;gt;container concept (lacks constructor taking a pair of iterators), but that's 
&lt;br&gt;&amp;gt;pretty easy to work around.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;blitz takes a little work, because it lacks proper iterators. &amp;nbsp;I have built 
&lt;br&gt;&amp;gt;boost::iterator adapters that handle that (perhaps not efficiently, though).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I don't know how to use numpy to get a nice generic interface on the c++ side.
&lt;br&gt;&amp;gt;_______________________________________________
&lt;br&gt;&amp;gt;glas mailing list
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=14021243&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;tt&gt;[Karl.Meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U. Leuven;Department of Computer Science
&lt;br&gt;adr:Room 02.014;;Celestijnenlaan 200A;Heverlee (Leuven);;B-3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=14021243&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;tel;cell:+32 474 26 66 59
&lt;br&gt;note:http://www.kuleuven.be/cwis/email_disclaimer.htm
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=14021243&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-crossposting--glas-and-mtl4---what-are-the-commons-and-differences-tp13744771p14021243.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-14010903</id>
	<title>Re: multi-dimensional arrays?</title>
	<published>2007-11-28T10:57:39Z</published>
	<updated>2007-11-28T10:57:39Z</updated>
	<author>
		<name>Neal Becker</name>
	</author>
	<content type="html">On Wednesday 28 November 2007, Evgenii Rudnyi wrote:
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt;I'm enthusiastically following mtl4 and glas developments.
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt;One thing that
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt;neither seems to address is arrays of dimension &amp;gt;2. &amp;nbsp;Is this true?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; NumPy supports multidimensional arrays:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.scipy.org/NumPy&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.scipy.org/NumPy&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Yes it does. &amp;nbsp;Unfortunately, it doesn't have a nice c++ interface, AFAIK.
&lt;br&gt;&lt;br&gt;What I'd like is to be able to write generic algorithms in c++ that can use 
&lt;br&gt;various multi-dimensional containers, and then expose them to python.
&lt;br&gt;&lt;br&gt;So far, what I've done is expose various container types to python (ublas, 
&lt;br&gt;blitz++) using boost::python. &amp;nbsp;Then, instantiate algorithms using these 
&lt;br&gt;containers to expose to python.
&lt;br&gt;&lt;br&gt;Each lib has it's own issues. &amp;nbsp;ublas, for example, doesn't conform to all of 
&lt;br&gt;container concept (lacks constructor taking a pair of iterators), but that's 
&lt;br&gt;pretty easy to work around.
&lt;br&gt;&lt;br&gt;blitz takes a little work, because it lacks proper iterators. &amp;nbsp;I have built 
&lt;br&gt;boost::iterator adapters that handle that (perhaps not efficiently, though).
&lt;br&gt;&lt;br&gt;I don't know how to use numpy to get a nice generic interface on the c++ side.
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=14010903&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-crossposting--glas-and-mtl4---what-are-the-commons-and-differences-tp13744771p14010903.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-14010226</id>
	<title>Re: multi-dimensional arrays?</title>
	<published>2007-11-28T10:28:19Z</published>
	<updated>2007-11-28T10:28:19Z</updated>
	<author>
		<name>Evgenii Rudnyi</name>
	</author>
	<content type="html">&amp;nbsp;&amp;gt;I'm enthusiastically following mtl4 and glas developments.
&lt;br&gt;&amp;nbsp;&amp;gt;One thing that
&lt;br&gt;&amp;nbsp;&amp;gt;neither seems to address is arrays of dimension &amp;gt;2. &amp;nbsp;Is this true?
&lt;br&gt;&lt;br&gt;NumPy supports multidimensional arrays:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.scipy.org/NumPy&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.scipy.org/NumPy&lt;/a&gt;&lt;br&gt;&lt;br&gt;Evgenii Rudnyi
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=14010226&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-crossposting--glas-and-mtl4---what-are-the-commons-and-differences-tp13744771p14010226.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13990413</id>
	<title>multi-dimensional arrays?</title>
	<published>2007-11-28T03:20:18Z</published>
	<updated>2007-11-28T03:20:18Z</updated>
	<author>
		<name>Neal Becker</name>
	</author>
	<content type="html">I'm enthusiastically following mtl4 and glas developments. &amp;nbsp;One thing that 
&lt;br&gt;neither seems to address is arrays of dimension &amp;gt;2. &amp;nbsp;Is this true?
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13990413&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-crossposting--glas-and-mtl4---what-are-the-commons-and-differences-tp13744771p13990413.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13763668</id>
	<title>Re: I'm using glas for developing quantum gate optimal program, and it's good</title>
	<published>2007-11-15T00:35:04Z</published>
	<updated>2007-11-15T00:35:04Z</updated>
	<author>
		<name>Tsai Dung-Bang</name>
	</author>
	<content type="html">Dear all,
&lt;br&gt;&lt;br&gt;sorry, I go to the wrong list, I should mail it to ublas. Please delete it
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;Tsai Dung-Bang
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13763668&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/I%27m-using-glas-for-developing-quantum-gate-optimal-program%2C-and-it%27s-good-tp13763592p13763668.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13763592</id>
	<title>I'm using glas for developing quantum gate optimal program, and it's good</title>
	<published>2007-11-15T00:28:28Z</published>
	<updated>2007-11-15T00:28:28Z</updated>
	<author>
		<name>Tsai Dung-Bang</name>
	</author>
	<content type="html">Dear all
&lt;br&gt;&lt;br&gt;Recently, I have studied some quantum computer gate problem using this
&lt;br&gt;library for performing matrix operating, and it works greatly. I feel
&lt;br&gt;it's very easy to use, fast, and the code is very clean. So I have
&lt;br&gt;implemented some library by myself such as matrix exponentialwhich is
&lt;br&gt;the most import part for solving Schrodinger eq.
&lt;br&gt;&lt;br&gt;First, I'm newbie to this library, but why when this library perform a
&lt;br&gt;complex vector inner product, it will simply multiply them without
&lt;br&gt;conjugate first vector first?
&lt;br&gt;&lt;br&gt;Ex.
&lt;br&gt;A = 3 + 4i
&lt;br&gt;&lt;br&gt;C = inner_prod(A,A) = -5 + 24i in glas library.
&lt;br&gt;but it should be &amp;nbsp;C = 25
&lt;br&gt;&lt;br&gt;Second, I know this library has atlas building, but it's possible for
&lt;br&gt;writing a self-contain QR-decomposition template, etc. , then we could
&lt;br&gt;take the advantage of template such that we are free of certainly
&lt;br&gt;float type.
&lt;br&gt;&lt;br&gt;Third, as a newbie, I would like to contribute to this library, what
&lt;br&gt;could I do at beginning?
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;Tsai Dung-Bang
&lt;br&gt;&lt;br&gt;Nation Taiwan University, Department of Physics.
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13763592&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/I%27m-using-glas-for-developing-quantum-gate-optimal-program%2C-and-it%27s-good-tp13763592p13763592.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13755167</id>
	<title>Re: [crossposting] glas and mtl4 - what are the commons and differences</title>
	<published>2007-11-14T11:52:17Z</published>
	<updated>2007-11-14T11:52:17Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">Dear Maik,
&lt;br&gt;&lt;br&gt;Peter and I will look into this. I am not sure that GLAS and MTL have 
&lt;br&gt;the same goals, but there is a large amount of overlap, especially in 
&lt;br&gt;the algorithms and containers, which should clearly be exploited.
&lt;br&gt;&lt;br&gt;Bindings are indeed useful. They are used in GLAS for interfacing with 
&lt;br&gt;the BLAS.
&lt;br&gt;&lt;br&gt;Best wishes,
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Maik Beckmann wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello dear mtl4 and glas people
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I know ublas,
&lt;br&gt;&amp;gt; &amp;nbsp; - &lt;a href=&quot;http://www.boost.org/libs/numeric/ublas/doc/index.htm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.boost.org/libs/numeric/ublas/doc/index.htm&lt;/a&gt;&lt;br&gt;&amp;gt; its potential successor glas (my impression) 
&lt;br&gt;&amp;gt; &amp;nbsp; - &lt;a href=&quot;http://sourceforge.net/projects/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/projects/glas&lt;/a&gt;&lt;br&gt;&amp;gt; and since yesterday mtl4
&lt;br&gt;&amp;gt; &amp;nbsp; - &lt;a href=&quot;http://www.osl.iu.edu/research/mtl/mtl4/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.osl.iu.edu/research/mtl/mtl4/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ublas is the lib I use today. My impression is that glas is the implemented by 
&lt;br&gt;&amp;gt; peoples (mainly Karl Meerbergen) who worked on ublas and want to rewrite it 
&lt;br&gt;&amp;gt; from scratch with C++0x in mind.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On the other side theres mtl4, which will be the successor mtl2 (mainly 
&lt;br&gt;&amp;gt; developed by Peter Gottschling).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What are the common goals and what are the differences between both template 
&lt;br&gt;&amp;gt; libs?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The first thing I noticed is that both started using C++0x concepts and it 
&lt;br&gt;&amp;gt; might be a good idea to share experiences on this very new area of C++ 
&lt;br&gt;&amp;gt; programming.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Another thing are blas/lapack backends like atlas. I think the numeric 
&lt;br&gt;&amp;gt; bindings contained by boost-sandbox do a very good job. 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; - Maik Beckmann &amp;nbsp;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; glas mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13755167&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;tt&gt;[karl.meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U.Leuven;Computer Science
&lt;br&gt;adr:Office 02.33;;Celestijnenlaan 200A;Leuven (Heverlee);;3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13755167&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;karl.meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13755167&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-crossposting--glas-and-mtl4---what-are-the-commons-and-differences-tp13744771p13755167.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13754345</id>
	<title>Re: [Mtl4] [crossposting] glas and mtl4 - what are the commons and differences</title>
	<published>2007-11-14T11:09:55Z</published>
	<updated>2007-11-14T11:09:55Z</updated>
	<author>
		<name>Maik Beckmann</name>
	</author>
	<content type="html">Am Mittwoch 14 November 2007 19:38:47 schrieb Peter Gottschling:
&lt;br&gt;&amp;gt; I hope this answered your question a little bit.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; Peter
&lt;br&gt;&lt;br&gt;Many thanks for this detailed answer! 
&lt;br&gt;&lt;br&gt;Regarding conceptgcc: My impression from the gcc mailing list is that the next 
&lt;br&gt;step will be merging concepts into mainline gcc. This won't happen for 
&lt;br&gt;gcc-4.3 and there is no reason for not waiting for gcc-4.4 development to be 
&lt;br&gt;started. &amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Maik Beckmann
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13754345&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-crossposting--glas-and-mtl4---what-are-the-commons-and-differences-tp13744771p13754345.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13753782</id>
	<title>Re: [Mtl4] [crossposting] glas and mtl4 - what are the commons and differences</title>
	<published>2007-11-14T10:38:47Z</published>
	<updated>2007-11-14T10:38:47Z</updated>
	<author>
		<name>Peter Gottschling</name>
	</author>
	<content type="html">Hello Maik,
&lt;br&gt;&lt;br&gt;I don't think that one can reduce GLAS to a mere ublas successor 
&lt;br&gt;although there is some overlap in the developers (Toon Knappen also 
&lt;br&gt;worked on both projects). The main goal of GLAS is the development of a 
&lt;br&gt;common interface for algebraic software accompanied with a prototype 
&lt;br&gt;implementation. &amp;nbsp;This is also described on the GLAS web page. &amp;nbsp;And maybe 
&lt;br&gt;Karl will tell you more about it.
&lt;br&gt;&lt;br&gt;MTL4 is written with many ideas from MTL2. &amp;nbsp;However, it was developed 
&lt;br&gt;from scratch. &amp;nbsp;Some design choices were changed, e.g., MTL2 used shallow 
&lt;br&gt;copy assignment and MTL4 deep copy.
&lt;br&gt;&lt;br&gt;The differences between GLAS and MTL4 are mainly the priorities. &amp;nbsp;While 
&lt;br&gt;GLAS primarily develops a common generic interface to other libraries 
&lt;br&gt;like BLAS, LAPACK, MTL not without providing its own code, MTL4 is 
&lt;br&gt;primarily a C++ library not without interfacing to other libraries. &amp;nbsp;For 
&lt;br&gt;instance you can write A= B * C; in MTL4 and if possible the 
&lt;br&gt;multiplication is performed in BLAS otherwise in C++ with quite good 
&lt;br&gt;performance. &amp;nbsp;(Unfortunately I haven't found the time to implement this 
&lt;br&gt;dispatching for other operations.)
&lt;br&gt;&lt;br&gt;Karl and I work very well together and I'm optimistic that the behavior 
&lt;br&gt;of both libraries will be well synchronized.
&lt;br&gt;&lt;br&gt;Regarding concepts you observed very well that we worked a lot on this 
&lt;br&gt;(in many cases together) and this will certainly be an important feature 
&lt;br&gt;of generic libraries in the future. Nevertheless, we both are currently 
&lt;br&gt;waiting for the compiler prototype to become more stable before 
&lt;br&gt;continuing with writing concept code. &amp;nbsp;This is not meant as a critic on 
&lt;br&gt;conceptgcc, the work Doug Gregor did in the last year is ingenious but 
&lt;br&gt;not even a genius can do this in one year.
&lt;br&gt;&lt;br&gt;Otherwise we have to admit that both projects are still in an early 
&lt;br&gt;stage of development considered the gigantic mountain of work and the 
&lt;br&gt;rather limited human resources (so far).
&lt;br&gt;&lt;br&gt;I hope this answered your question a little bit.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Peter
&lt;br&gt;&lt;br&gt;Maik Beckmann schrieb:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello dear mtl4 and glas people
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I know ublas,
&lt;br&gt;&amp;gt; &amp;nbsp; - &lt;a href=&quot;http://www.boost.org/libs/numeric/ublas/doc/index.htm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.boost.org/libs/numeric/ublas/doc/index.htm&lt;/a&gt;&lt;br&gt;&amp;gt; its potential successor glas (my impression) 
&lt;br&gt;&amp;gt; &amp;nbsp; - &lt;a href=&quot;http://sourceforge.net/projects/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/projects/glas&lt;/a&gt;&lt;br&gt;&amp;gt; and since yesterday mtl4
&lt;br&gt;&amp;gt; &amp;nbsp; - &lt;a href=&quot;http://www.osl.iu.edu/research/mtl/mtl4/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.osl.iu.edu/research/mtl/mtl4/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ublas is the lib I use today. My impression is that glas is the implemented by 
&lt;br&gt;&amp;gt; peoples (mainly Karl Meerbergen) who worked on ublas and want to rewrite it 
&lt;br&gt;&amp;gt; from scratch with C++0x in mind.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On the other side theres mtl4, which will be the successor mtl2 (mainly 
&lt;br&gt;&amp;gt; developed by Peter Gottschling).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What are the common goals and what are the differences between both template 
&lt;br&gt;&amp;gt; libs?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The first thing I noticed is that both started using C++0x concepts and it 
&lt;br&gt;&amp;gt; might be a good idea to share experiences on this very new area of C++ 
&lt;br&gt;&amp;gt; programming.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Another thing are blas/lapack backends like atlas. I think the numeric 
&lt;br&gt;&amp;gt; bindings contained by boost-sandbox do a very good job. 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; - Maik Beckmann &amp;nbsp;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; MTL4 mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13753782&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MTL4@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.osl.iu.edu/mailman/listinfo.cgi/mtl4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.osl.iu.edu/mailman/listinfo.cgi/mtl4&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13753782&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-crossposting--glas-and-mtl4---what-are-the-commons-and-differences-tp13744771p13753782.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13744771</id>
	<title>[crossposting] glas and mtl4 - what are the commons and differences</title>
	<published>2007-11-14T03:13:09Z</published>
	<updated>2007-11-14T03:13:09Z</updated>
	<author>
		<name>Maik Beckmann</name>
	</author>
	<content type="html">Hello dear mtl4 and glas people
&lt;br&gt;&lt;br&gt;I know ublas,
&lt;br&gt;&amp;nbsp; - &lt;a href=&quot;http://www.boost.org/libs/numeric/ublas/doc/index.htm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.boost.org/libs/numeric/ublas/doc/index.htm&lt;/a&gt;&lt;br&gt;its potential successor glas (my impression) 
&lt;br&gt;&amp;nbsp; - &lt;a href=&quot;http://sourceforge.net/projects/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/projects/glas&lt;/a&gt;&lt;br&gt;and since yesterday mtl4
&lt;br&gt;&amp;nbsp; - &lt;a href=&quot;http://www.osl.iu.edu/research/mtl/mtl4/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.osl.iu.edu/research/mtl/mtl4/&lt;/a&gt;&lt;br&gt;&lt;br&gt;ublas is the lib I use today. My impression is that glas is the implemented by 
&lt;br&gt;peoples (mainly Karl Meerbergen) who worked on ublas and want to rewrite it 
&lt;br&gt;from scratch with C++0x in mind.
&lt;br&gt;&lt;br&gt;On the other side theres mtl4, which will be the successor mtl2 (mainly 
&lt;br&gt;developed by Peter Gottschling).
&lt;br&gt;&lt;br&gt;What are the common goals and what are the differences between both template 
&lt;br&gt;libs?
&lt;br&gt;&lt;br&gt;The first thing I noticed is that both started using C++0x concepts and it 
&lt;br&gt;might be a good idea to share experiences on this very new area of C++ 
&lt;br&gt;programming.
&lt;br&gt;&lt;br&gt;Another thing are blas/lapack backends like atlas. I think the numeric 
&lt;br&gt;bindings contained by boost-sandbox do a very good job. 
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;- Maik Beckmann &amp;nbsp;
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13744771&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-crossposting--glas-and-mtl4---what-are-the-commons-and-differences-tp13744771p13744771.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13607513</id>
	<title>perf test</title>
	<published>2007-11-06T06:16:46Z</published>
	<updated>2007-11-06T06:16:46Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">Dear List,
&lt;br&gt;&lt;br&gt;Performance tests for some routines are available on 
&lt;br&gt;&lt;a href=&quot;http://www.cs.kuleuven.be/~karlm/glas/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cs.kuleuven.be/~karlm/glas/&lt;/a&gt;&lt;br&gt;&lt;br&gt;The results are uncouraging. No significant efforts were done to 
&lt;br&gt;optimize the codes.
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[Karl.Meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U. Leuven;Department of Computer Science
&lt;br&gt;adr:Room 02.014;;Celestijnenlaan 200A;Heverlee (Leuven);;B-3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13607513&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;tel;cell:+32 474 26 66 59
&lt;br&gt;note:http://www.kuleuven.be/cwis/email_disclaimer.htm
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13607513&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/perf-test-tp13607513p13607513.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13232689</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-16T06:30:07Z</published>
	<updated>2007-10-16T06:30:07Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">Neal Becker wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;On Tuesday 16 October 2007, Karl Meerbergen wrote:
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Pieter Collins wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;I think that a general-purpose package needs to provide vector/matrix
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;classes taylored to various uses. &amp;nbsp;An application using many 3d vectors
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;will have very different requirements (fast allocation/deallocation,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;efficient storage) to an application using 1000x1000 matrices (efficient
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;manipulation using views/slices).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;As I see it, reference counting will improve safety and may allow
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;storage and slicing to be implemented by the same class, but does not
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;introduce extra mathematical functionality. The expense is probably
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;worth it for large objects, but not for small objects.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;Regarding the copy semantics, how about introducing a new concept
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;quot;VectorView&amp;quot; which uses shallow copies to complement &amp;quot;VectorContainer&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;which uses deep copies? It seems like this concept is sufficiently
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;important to be worth adding, though I generally think it's important to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;keep the number of different concepts to a minimum.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;Presumably it would be possible to separate storage (including reference
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;counting) from the rest of the code by using an array template argument
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;similar to uBlas.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;Regards,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;Pieter
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Hi Pieter,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;At this stage, there is no container concept in GLAS, so all options are
&lt;br&gt;&amp;gt;&amp;gt;still open. I am in favour of having two container concepts, as you
&lt;br&gt;&amp;gt;&amp;gt;suggest, View and Container, one with a deep copy constructor, the other
&lt;br&gt;&amp;gt;&amp;gt;with a shallow copy constructor. I am currently using a shared_ptr for
&lt;br&gt;&amp;gt;&amp;gt;this instead of a view.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;If two types of containers exist, the user has to be aware of the
&lt;br&gt;&amp;gt;&amp;gt;difference in behaviour between copy constructors.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;I am not sure that a template argument is good enough to make clear that
&lt;br&gt;&amp;gt;&amp;gt;the copy constructor has different behaviour ?!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Currently you can do something like
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;dense_vector&amp;lt;double&amp;gt; v( 10 ) ;
&lt;br&gt;&amp;gt;&amp;gt;dense_vector&amp;lt;double&amp;gt; w( 4.0 * v ) ;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;This does not make sense with a shallow copy. In the case of a shallow
&lt;br&gt;&amp;gt;&amp;gt;copy, this could become:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;dense_vector&amp;lt;double&amp;gt; v( 10 ) ;
&lt;br&gt;&amp;gt;&amp;gt;dense_vector&amp;lt;double&amp;gt; w( size(v) ) ; w = 4.0 * v ;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Best regards,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Karl
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;That is exactly what I don't want. &amp;nbsp;Having different types for a view vs. an 
&lt;br&gt;&amp;gt;array will make it much harder to interoperate with other languages. &amp;nbsp;I 
&lt;br&gt;&amp;gt;believe the unified design is more elegant.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;An additional benefit of separating a view and memory management is that an 
&lt;br&gt;&amp;gt;externally managed blob of memory can be adopted. &amp;nbsp;This allows 
&lt;br&gt;&amp;gt;inter-operation with other array libraries. &amp;nbsp;For example, suppose we want to 
&lt;br&gt;&amp;gt;interoperate with python numpy objects.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;/div&gt;&lt;br&gt;Neal,
&lt;br&gt;&lt;br&gt;&lt;br&gt;Your concern to try and use unified types is correct.
&lt;br&gt;The unified design you mention is possible to some extent, but it is not 
&lt;br&gt;required for interoperability with other languages. (We actually use 
&lt;br&gt;GLAS with BLAS, LAPACK and MUMPS.) For dynamic binding, it makes life 
&lt;br&gt;clearly easier. I recall this was suggested several times on the ublas 
&lt;br&gt;mailing list. So it could be an interesting feature of GLAS. I put it in 
&lt;br&gt;the todo.
&lt;br&gt;&lt;br&gt;For each concept, we could provide a unified class: e.g.
&lt;br&gt;continuous_dense_vector&amp;lt;T&amp;gt;
&lt;br&gt;strided_dense_vector&amp;lt;T&amp;gt;
&lt;br&gt;Whether this contains a reference count or not is another issue.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;If we follow blitz design, then copy constructor will reference the other 
&lt;br&gt;&amp;gt;array data. &amp;nbsp;BUT, copying an expression will not.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;dense_vector&amp;lt;double&amp;gt; w (v.copy()) // deep copy
&lt;br&gt;&amp;gt;dense_vector&amp;lt;double&amp;gt; w (v * 4) // no need to say (v*4).copy()
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Here, I see the following problem (if I understand well):
&lt;br&gt;&lt;br&gt;dense_vector&amp;lt;double&amp;gt; v ( w )
&lt;br&gt;is a shallow copy when w is of the same type as v and a deep copy when 
&lt;br&gt;it is another type. I do not think this is a good idea, especially, when 
&lt;br&gt;you do not know the type of w, as it often happens in template programming.
&lt;br&gt;&lt;br&gt;I hope my analysis of your proposal is correct.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[Karl.Meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U. Leuven;Department of Computer Science
&lt;br&gt;adr:Room 02.014;;Celestijnenlaan 200A;Heverlee (Leuven);;B-3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13232689&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;tel;cell:+32 474 26 66 59
&lt;br&gt;note:http://www.kuleuven.be/cwis/email_disclaimer.htm
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13232689&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13232689.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13231276</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-16T05:21:57Z</published>
	<updated>2007-10-16T05:21:57Z</updated>
	<author>
		<name>Neal Becker</name>
	</author>
	<content type="html">On Tuesday 16 October 2007, Karl Meerbergen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Pieter Collins wrote:
&lt;br&gt;&amp;gt; &amp;gt;I think that a general-purpose package needs to provide vector/matrix
&lt;br&gt;&amp;gt; &amp;gt;classes taylored to various uses. &amp;nbsp;An application using many 3d vectors
&lt;br&gt;&amp;gt; &amp;gt;will have very different requirements (fast allocation/deallocation,
&lt;br&gt;&amp;gt; &amp;gt;efficient storage) to an application using 1000x1000 matrices (efficient
&lt;br&gt;&amp;gt; &amp;gt;manipulation using views/slices).
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;As I see it, reference counting will improve safety and may allow
&lt;br&gt;&amp;gt; &amp;gt;storage and slicing to be implemented by the same class, but does not
&lt;br&gt;&amp;gt; &amp;gt;introduce extra mathematical functionality. The expense is probably
&lt;br&gt;&amp;gt; &amp;gt;worth it for large objects, but not for small objects.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;Regarding the copy semantics, how about introducing a new concept
&lt;br&gt;&amp;gt; &amp;gt;&amp;quot;VectorView&amp;quot; which uses shallow copies to complement &amp;quot;VectorContainer&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt;which uses deep copies? It seems like this concept is sufficiently
&lt;br&gt;&amp;gt; &amp;gt;important to be worth adding, though I generally think it's important to
&lt;br&gt;&amp;gt; &amp;gt;keep the number of different concepts to a minimum.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;Presumably it would be possible to separate storage (including reference
&lt;br&gt;&amp;gt; &amp;gt;counting) from the rest of the code by using an array template argument
&lt;br&gt;&amp;gt; &amp;gt;similar to uBlas.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;Regards,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;Pieter
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi Pieter,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; At this stage, there is no container concept in GLAS, so all options are
&lt;br&gt;&amp;gt; still open. I am in favour of having two container concepts, as you
&lt;br&gt;&amp;gt; suggest, View and Container, one with a deep copy constructor, the other
&lt;br&gt;&amp;gt; with a shallow copy constructor. I am currently using a shared_ptr for
&lt;br&gt;&amp;gt; this instead of a view.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If two types of containers exist, the user has to be aware of the
&lt;br&gt;&amp;gt; difference in behaviour between copy constructors.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am not sure that a template argument is good enough to make clear that
&lt;br&gt;&amp;gt; the copy constructor has different behaviour ?!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Currently you can do something like
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; dense_vector&amp;lt;double&amp;gt; v( 10 ) ;
&lt;br&gt;&amp;gt; dense_vector&amp;lt;double&amp;gt; w( 4.0 * v ) ;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This does not make sense with a shallow copy. In the case of a shallow
&lt;br&gt;&amp;gt; copy, this could become:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; dense_vector&amp;lt;double&amp;gt; v( 10 ) ;
&lt;br&gt;&amp;gt; dense_vector&amp;lt;double&amp;gt; w( size(v) ) ; w = 4.0 * v ;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Best regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Karl
&lt;/div&gt;&lt;br&gt;That is exactly what I don't want. &amp;nbsp;Having different types for a view vs. an 
&lt;br&gt;array will make it much harder to interoperate with other languages. &amp;nbsp;I 
&lt;br&gt;believe the unified design is more elegant.
&lt;br&gt;&lt;br&gt;An additional benefit of separating a view and memory management is that an 
&lt;br&gt;externally managed blob of memory can be adopted. &amp;nbsp;This allows 
&lt;br&gt;inter-operation with other array libraries. &amp;nbsp;For example, suppose we want to 
&lt;br&gt;interoperate with python numpy objects.
&lt;br&gt;&lt;br&gt;If we follow blitz design, then copy constructor will reference the other 
&lt;br&gt;array data. &amp;nbsp;BUT, copying an expression will not.
&lt;br&gt;&lt;br&gt;dense_vector&amp;lt;double&amp;gt; w (v.copy()) // deep copy
&lt;br&gt;dense_vector&amp;lt;double&amp;gt; w (v * 4) // no need to say (v*4).copy()
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13231276&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13231276.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13227800</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-16T00:55:54Z</published>
	<updated>2007-10-16T00:55:54Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">Pieter Collins wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;I think that a general-purpose package needs to provide vector/matrix 
&lt;br&gt;&amp;gt;classes taylored to various uses. &amp;nbsp;An application using many 3d vectors 
&lt;br&gt;&amp;gt;will have very different requirements (fast allocation/deallocation, 
&lt;br&gt;&amp;gt;efficient storage) to an application using 1000x1000 matrices (efficient 
&lt;br&gt;&amp;gt;manipulation using views/slices).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;As I see it, reference counting will improve safety and may allow 
&lt;br&gt;&amp;gt;storage and slicing to be implemented by the same class, but does not 
&lt;br&gt;&amp;gt;introduce extra mathematical functionality. The expense is probably 
&lt;br&gt;&amp;gt;worth it for large objects, but not for small objects.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Regarding the copy semantics, how about introducing a new concept 
&lt;br&gt;&amp;gt;&amp;quot;VectorView&amp;quot; which uses shallow copies to complement &amp;quot;VectorContainer&amp;quot; 
&lt;br&gt;&amp;gt;which uses deep copies? It seems like this concept is sufficiently 
&lt;br&gt;&amp;gt;important to be worth adding, though I generally think it's important to 
&lt;br&gt;&amp;gt;keep the number of different concepts to a minimum.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Presumably it would be possible to separate storage (including reference 
&lt;br&gt;&amp;gt;counting) from the rest of the code by using an array template argument 
&lt;br&gt;&amp;gt;similar to uBlas.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Pieter
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;/div&gt;Hi Pieter,
&lt;br&gt;&lt;br&gt;At this stage, there is no container concept in GLAS, so all options are 
&lt;br&gt;still open. I am in favour of having two container concepts, as you 
&lt;br&gt;suggest, View and Container, one with a deep copy constructor, the other 
&lt;br&gt;with a shallow copy constructor. I am currently using a shared_ptr for 
&lt;br&gt;this instead of a view.
&lt;br&gt;&lt;br&gt;If two types of containers exist, the user has to be aware of the 
&lt;br&gt;difference in behaviour between copy constructors.
&lt;br&gt;&lt;br&gt;I am not sure that a template argument is good enough to make clear that 
&lt;br&gt;the copy constructor has different behaviour ?!
&lt;br&gt;&lt;br&gt;Currently you can do something like
&lt;br&gt;&lt;br&gt;dense_vector&amp;lt;double&amp;gt; v( 10 ) ;
&lt;br&gt;dense_vector&amp;lt;double&amp;gt; w( 4.0 * v ) ;
&lt;br&gt;&lt;br&gt;This does not make sense with a shallow copy. In the case of a shallow 
&lt;br&gt;copy, this could become:
&lt;br&gt;&lt;br&gt;dense_vector&amp;lt;double&amp;gt; v( 10 ) ;
&lt;br&gt;dense_vector&amp;lt;double&amp;gt; w( size(v) ) ; w = 4.0 * v ;
&lt;br&gt;&lt;br&gt;Best regards,
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[Karl.Meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U. Leuven;Department of Computer Science
&lt;br&gt;adr:Room 02.014;;Celestijnenlaan 200A;Heverlee (Leuven);;B-3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13227800&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;tel;cell:+32 474 26 66 59
&lt;br&gt;note:http://www.kuleuven.be/cwis/email_disclaimer.htm
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13227800&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13227800.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13209511</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-15T03:31:48Z</published>
	<updated>2007-10-15T03:31:48Z</updated>
	<author>
		<name>Pieter Collins</name>
	</author>
	<content type="html">I think that a general-purpose package needs to provide vector/matrix 
&lt;br&gt;classes taylored to various uses. &amp;nbsp;An application using many 3d vectors 
&lt;br&gt;will have very different requirements (fast allocation/deallocation, 
&lt;br&gt;efficient storage) to an application using 1000x1000 matrices (efficient 
&lt;br&gt;manipulation using views/slices).
&lt;br&gt;&lt;br&gt;As I see it, reference counting will improve safety and may allow 
&lt;br&gt;storage and slicing to be implemented by the same class, but does not 
&lt;br&gt;introduce extra mathematical functionality. The expense is probably 
&lt;br&gt;worth it for large objects, but not for small objects.
&lt;br&gt;&lt;br&gt;Regarding the copy semantics, how about introducing a new concept 
&lt;br&gt;&amp;quot;VectorView&amp;quot; which uses shallow copies to complement &amp;quot;VectorContainer&amp;quot; 
&lt;br&gt;which uses deep copies? It seems like this concept is sufficiently 
&lt;br&gt;important to be worth adding, though I generally think it's important to 
&lt;br&gt;keep the number of different concepts to a minimum.
&lt;br&gt;&lt;br&gt;Presumably it would be possible to separate storage (including reference 
&lt;br&gt;counting) from the rest of the code by using an array template argument 
&lt;br&gt;similar to uBlas.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Pieter
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;br&gt;Dr. Pieter Collins
&lt;br&gt;Centrum voor Wiskunde en Informatica
&lt;br&gt;Postbus 94079
&lt;br&gt;1090 GB Amsterdam
&lt;br&gt;The Netherlands
&lt;br&gt;&lt;br&gt;Tel: +31 20 5924196
&lt;br&gt;Fax: &amp;nbsp;+31 20 5924199
&lt;br&gt;Email: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13209511&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pieter.Collins@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13209511&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13209511.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13187300</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-12T11:42:54Z</published>
	<updated>2007-10-12T11:42:54Z</updated>
	<author>
		<name>Andreas P. Priesnitz</name>
	</author>
	<content type="html">On Fri, 12 Oct 2007, Karl Meerbergen wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Do you see (other) situations where the storage of a reference could create 
&lt;br&gt;&amp;gt; overhead?
&lt;br&gt;&lt;br&gt;You might want to create views recursively (view into a view into a ... 
&lt;br&gt;container), for instance when modeling divide-and-conquer-algorithms 
&lt;br&gt;like quicksort that way.
&lt;br&gt;&lt;br&gt;In such cases, the number of views may have the same order of magnitude as 
&lt;br&gt;the number of container elements. Thus, the overhead for the reference 
&lt;br&gt;count would become significant. (and unnecessary)
&lt;br&gt;&lt;br&gt;(BTW: There is as well an increase in run time by creating, initializing, 
&lt;br&gt;incrementing, decrementing, checking, and deleting the counter.)
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; As for smart pointers, we can have different views. A view could take 
&lt;br&gt;&amp;gt; ownership of the container (as for an auto_ptr, e.g.). The reference count 
&lt;br&gt;&amp;gt; would not be needed and this would make people happy who use small vectors.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; More important, I think, is the issue about the assignment operator and the 
&lt;br&gt;&amp;gt; copy constructor.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Currently, the copy constructor makes a shallow copy for all views and 
&lt;br&gt;&amp;gt; expression objects, while the assignment operator is a deep copy. This looks 
&lt;br&gt;&amp;gt; like a conflicting situation. UBlas does the same I think. What about MTL?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am not very keen on giving up the deep copy concept of w = v. Does anyone 
&lt;br&gt;&amp;gt; have an interesting idea?
&lt;/div&gt;&lt;br&gt;As you say, different kinds of ``smart views'' could coexist. In my 
&lt;br&gt;understanding, w = v should be overloaded to perform either deep or 
&lt;br&gt;shallow, depending on the way(s) w and v are referencing their data.
&lt;br&gt;&lt;br&gt;But the straightforward implementation - to define for any container/view 
&lt;br&gt;proper assignments from any other kind of view - is likely to cause a 
&lt;br&gt;considerable amount of (probably boilerplate) code.
&lt;br&gt;&lt;br&gt;The very interesting question would then be if and how one can express 
&lt;br&gt;this overload generically, as the choice of copy concept depends merely on 
&lt;br&gt;the kind of reference, not on the kind of data.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Andreas
&lt;br&gt;&lt;br&gt;[&lt;a href=&quot;http://www.cs.chalmers.se/~priesnit&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cs.chalmers.se/~priesnit&lt;/a&gt;]
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13187300&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13187300.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13179736</id>
	<title>Ref counting</title>
	<published>2007-10-12T11:29:40Z</published>
	<updated>2007-10-12T11:29:40Z</updated>
	<author>
		<name>Neal Becker</name>
	</author>
	<content type="html">Here is one example of where I see the usefulness. &amp;nbsp;I have many algorithms 
&lt;br&gt;written in c++ that I want to expose to python. &amp;nbsp;Using most other array 
&lt;br&gt;libraries, a slice of an array is a different object type than an array. &amp;nbsp;
&lt;br&gt;This means that on the python side we now have to deal with both arrays, and 
&lt;br&gt;array slices, and the combinatorial explosion of combinations.
&lt;br&gt;&lt;br&gt;If writing in strictly c++, that's not a problem because the compiler deals 
&lt;br&gt;with the compile time polymorphism. &amp;nbsp;That's no help for mixing compile-time 
&lt;br&gt;with run-time.
&lt;br&gt;&lt;br&gt;With ref counting, there is no distinction between these concepts. &amp;nbsp;All arrays 
&lt;br&gt;are 'views' of memory. &amp;nbsp;A slice of an array is to python just another array. &amp;nbsp;
&lt;br&gt;That makes things much simpler.
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13179736&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Ref-counting-tp13179736p13179736.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13177210</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-12T09:08:29Z</published>
	<updated>2007-10-12T09:08:29Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">Dear List,
&lt;br&gt;&lt;br&gt;I would like to continue this discussion since it may lead to a 
&lt;br&gt;significant change in the development of the library.
&lt;br&gt;&lt;br&gt;I see several situations, where containers could be destroyed before the 
&lt;br&gt;view. So, a reference count is indeed useful.
&lt;br&gt;&lt;br&gt;One of my previous colleagues needed fixed size vectors of small size 
&lt;br&gt;for a finite element code. He refused to use ublas vectors because the 
&lt;br&gt;storage of the size created extra memory overhead.
&lt;br&gt;&lt;br&gt;Do you see (other) situations where the storage of a reference could 
&lt;br&gt;create overhead?
&lt;br&gt;&lt;br&gt;As for smart pointers, we can have different views. A view could take 
&lt;br&gt;ownership of the container (as for an auto_ptr, e.g.). The reference 
&lt;br&gt;count would not be needed and this would make people happy who use small 
&lt;br&gt;vectors.
&lt;br&gt;&lt;br&gt;More important, I think, is the issue about the assignment operator and 
&lt;br&gt;the copy constructor.
&lt;br&gt;&lt;br&gt;Currently, the copy constructor makes a shallow copy for all views and 
&lt;br&gt;expression objects, while the assignment operator is a deep copy. This 
&lt;br&gt;looks like a conflicting situation. UBlas does the same I think. What 
&lt;br&gt;about MTL?
&lt;br&gt;&lt;br&gt;I am not very keen on giving up the deep copy concept of w = v. Does 
&lt;br&gt;anyone have an interesting idea?
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Russell Smiley wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt;-----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt;From: Russell Smiley
&lt;br&gt;&amp;gt;&amp;gt;Subject: Re: [glas] Reference counting?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;-----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;From: &amp;nbsp;Karl Meerbergen
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;Subject: Re: [glas] Reference counting?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;* if v and w are two vectors (or vector views), what does the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;operation 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;w = v do ?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;In my implementation of a reference counted object w=v means that w
&lt;br&gt;&amp;gt;&amp;gt;drops the reference to its current storage (with a resulting decrement
&lt;br&gt;&amp;gt;&amp;gt;to the reference count for that object) and then picks up the 
&lt;br&gt;&amp;gt;&amp;gt;reference
&lt;br&gt;&amp;gt;&amp;gt;to the storage in v with a resulting increment to that 
&lt;br&gt;&amp;gt;&amp;gt;reference count.
&lt;br&gt;&amp;gt;&amp;gt;I think this is the most useful for general application.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;If you want to copy values from the v storage into the w storage then
&lt;br&gt;&amp;gt;&amp;gt;there are two separate methods:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;w.value_copy(v) - copies values from v, but w dereferences current
&lt;br&gt;&amp;gt;&amp;gt;storage and creates a new 'blank' storage before the copy.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;w.value_copy_this_reference(v) - copies values from v into the current
&lt;br&gt;&amp;gt;&amp;gt;storage of w.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I forgot there is a third method:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;w.value_copy() which tells w to start a reference to new storage copying
&lt;br&gt;&amp;gt;the values from the old storage.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Russell.
&lt;br&gt;&amp;gt;_______________________________________________
&lt;br&gt;&amp;gt;glas mailing list
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13177210&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;tt&gt;[Karl.Meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U. Leuven;Department of Computer Science
&lt;br&gt;adr:Room 02.014;;Celestijnenlaan 200A;Heverlee (Leuven);;B-3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13177210&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;tel;cell:+32 474 26 66 59
&lt;br&gt;note:http://www.kuleuven.be/cwis/email_disclaimer.htm
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13177210&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13177210.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13176460</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-12T08:36:53Z</published>
	<updated>2007-10-12T08:36:53Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">Russell Smiley wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt;-----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt;From: &amp;nbsp;Karl Meerbergen
&lt;br&gt;&amp;gt;&amp;gt;Subject: Re: [glas] Reference counting?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;* if v and w are two vectors (or vector views), what does the 
&lt;br&gt;&amp;gt;&amp;gt;operation 
&lt;br&gt;&amp;gt;&amp;gt;w = v do ?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;In my implementation of a reference counted object w=v means that w
&lt;br&gt;&amp;gt;drops the reference to its current storage (with a resulting decrement
&lt;br&gt;&amp;gt;to the reference count for that object) and then picks up the reference
&lt;br&gt;&amp;gt;to the storage in v with a resulting increment to that reference count.
&lt;br&gt;&amp;gt;I think this is the most useful for general application.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;If you want to copy values from the v storage into the w storage then
&lt;br&gt;&amp;gt;there are two separate methods:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;w.value_copy(v) - copies values from v, but w dereferences current
&lt;br&gt;&amp;gt;storage and creates a new 'blank' storage before the copy.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;w.value_copy_this_reference(v) - copies values from v into the current
&lt;br&gt;&amp;gt;storage of w.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;/div&gt;Hi Russell,
&lt;br&gt;&lt;br&gt;In previous discussions, it was suggested that w = v performs a deep copy.
&lt;br&gt;&lt;br&gt;&amp;nbsp;From a mathematics point of view, this is also what you expect.
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[Karl.Meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U. Leuven;Department of Computer Science
&lt;br&gt;adr:Room 02.014;;Celestijnenlaan 200A;Heverlee (Leuven);;B-3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176460&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;tel;cell:+32 474 26 66 59
&lt;br&gt;note:http://www.kuleuven.be/cwis/email_disclaimer.htm
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176460&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13176460.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13176415</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-12T08:34:45Z</published>
	<updated>2007-10-12T08:34:45Z</updated>
	<author>
		<name>Russell Smiley</name>
	</author>
	<content type="html">&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: Russell Smiley
&lt;br&gt;&amp;gt; Subject: Re: [glas] Reference counting?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; &amp;gt; From: &amp;nbsp;Karl Meerbergen
&lt;br&gt;&amp;gt; &amp;gt; Subject: Re: [glas] Reference counting?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; * if v and w are two vectors (or vector views), what does the
&lt;br&gt;&amp;gt; &amp;gt; operation 
&lt;br&gt;&amp;gt; &amp;gt; w = v do ?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In my implementation of a reference counted object w=v means that w
&lt;br&gt;&amp;gt; drops the reference to its current storage (with a resulting decrement
&lt;br&gt;&amp;gt; to the reference count for that object) and then picks up the 
&lt;br&gt;&amp;gt; reference
&lt;br&gt;&amp;gt; to the storage in v with a resulting increment to that 
&lt;br&gt;&amp;gt; reference count.
&lt;br&gt;&amp;gt; I think this is the most useful for general application.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If you want to copy values from the v storage into the w storage then
&lt;br&gt;&amp;gt; there are two separate methods:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; w.value_copy(v) - copies values from v, but w dereferences current
&lt;br&gt;&amp;gt; storage and creates a new 'blank' storage before the copy.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; w.value_copy_this_reference(v) - copies values from v into the current
&lt;br&gt;&amp;gt; storage of w.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;I forgot there is a third method:
&lt;br&gt;&lt;br&gt;w.value_copy() which tells w to start a reference to new storage copying
&lt;br&gt;the values from the old storage.
&lt;br&gt;&lt;br&gt;Russell.
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176415&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13176415.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13176277</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-12T08:27:13Z</published>
	<updated>2007-10-12T08:27:13Z</updated>
	<author>
		<name>Russell Smiley</name>
	</author>
	<content type="html">&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &amp;nbsp;Karl Meerbergen
&lt;br&gt;&amp;gt; Subject: Re: [glas] Reference counting?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; * if v and w are two vectors (or vector views), what does the 
&lt;br&gt;&amp;gt; operation 
&lt;br&gt;&amp;gt; w = v do ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;In my implementation of a reference counted object w=v means that w
&lt;br&gt;drops the reference to its current storage (with a resulting decrement
&lt;br&gt;to the reference count for that object) and then picks up the reference
&lt;br&gt;to the storage in v with a resulting increment to that reference count.
&lt;br&gt;I think this is the most useful for general application.
&lt;br&gt;&lt;br&gt;If you want to copy values from the v storage into the w storage then
&lt;br&gt;there are two separate methods:
&lt;br&gt;&lt;br&gt;w.value_copy(v) - copies values from v, but w dereferences current
&lt;br&gt;storage and creates a new 'blank' storage before the copy.
&lt;br&gt;&lt;br&gt;w.value_copy_this_reference(v) - copies values from v into the current
&lt;br&gt;storage of w.
&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;&lt;br&gt;Russell.
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176277&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13176277.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13176198</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-12T08:22:56Z</published>
	<updated>2007-10-12T08:22:56Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">Neal Becker wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;On Friday 12 October 2007, Bert Rodiers wrote:
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Hello Karl,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;In RogueWave they do the following:
&lt;br&gt;&amp;gt;&amp;gt;A vector has a view, which on its turn points to the actual data (a C++
&lt;br&gt;&amp;gt;&amp;gt;data structure aggregating the data).
&lt;br&gt;&amp;gt;&amp;gt;When you for example apply a slice on your vector you get a new vector with
&lt;br&gt;&amp;gt;&amp;gt;a different view on the same data (the sharing of the data happens with
&lt;br&gt;&amp;gt;&amp;gt;reference counting, and the view keeps track of the new start, length and
&lt;br&gt;&amp;gt;&amp;gt;stride). The data is cleaned up at the moment no views exist anymore. For
&lt;br&gt;&amp;gt;&amp;gt;matrices and higher dimension structures they also apply this so that when
&lt;br&gt;&amp;gt;&amp;gt;you extract a column from a matrix the data is shared between the original
&lt;br&gt;&amp;gt;&amp;gt;matrix and the vector which was the result of the slice.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;In blitz++ this is also applied to 'components' of an array. &amp;nbsp;For example, 
&lt;br&gt;&amp;gt;complex has real and imag components. &amp;nbsp;Thus, real(array) is an lvalue! &amp;nbsp;Very 
&lt;br&gt;&amp;gt;nice, IMO.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;/div&gt;In GLAS, real(array) is also an lvalue ;-) At the moment, it is only 
&lt;br&gt;const, but this is not hard to change.
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[Karl.Meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U. Leuven;Department of Computer Science
&lt;br&gt;adr:Room 02.014;;Celestijnenlaan 200A;Heverlee (Leuven);;B-3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176198&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;tel;cell:+32 474 26 66 59
&lt;br&gt;note:http://www.kuleuven.be/cwis/email_disclaimer.htm
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176198&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13176198.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13176109</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-12T08:16:13Z</published>
	<updated>2007-10-12T08:16:13Z</updated>
	<author>
		<name>Neal Becker</name>
	</author>
	<content type="html">On Friday 12 October 2007, Bert Rodiers wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello Karl,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In RogueWave they do the following:
&lt;br&gt;&amp;gt; A vector has a view, which on its turn points to the actual data (a C++
&lt;br&gt;&amp;gt; data structure aggregating the data).
&lt;br&gt;&amp;gt; When you for example apply a slice on your vector you get a new vector with
&lt;br&gt;&amp;gt; a different view on the same data (the sharing of the data happens with
&lt;br&gt;&amp;gt; reference counting, and the view keeps track of the new start, length and
&lt;br&gt;&amp;gt; stride). The data is cleaned up at the moment no views exist anymore. For
&lt;br&gt;&amp;gt; matrices and higher dimension structures they also apply this so that when
&lt;br&gt;&amp;gt; you extract a column from a matrix the data is shared between the original
&lt;br&gt;&amp;gt; matrix and the vector which was the result of the slice.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;In blitz++ this is also applied to 'components' of an array. &amp;nbsp;For example, 
&lt;br&gt;complex has real and imag components. &amp;nbsp;Thus, real(array) is an lvalue! &amp;nbsp;Very 
&lt;br&gt;nice, IMO.
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176109&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13176109.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13176083</id>
	<title>perf test</title>
	<published>2007-10-12T08:15:05Z</published>
	<updated>2007-10-12T08:15:05Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">Hello Yvette,
&lt;br&gt;&lt;br&gt;I have split up the python script run.py into run.py and report.py:
&lt;br&gt;run.py runs the tests
&lt;br&gt;report.py makes the report.
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[Karl.Meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U. Leuven;Department of Computer Science
&lt;br&gt;adr:Room 02.014;;Celestijnenlaan 200A;Heverlee (Leuven);;B-3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176083&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;tel;cell:+32 474 26 66 59
&lt;br&gt;note:http://www.kuleuven.be/cwis/email_disclaimer.htm
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176083&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/perf-test-tp13176083p13176083.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13176071</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-12T08:14:50Z</published>
	<updated>2007-10-12T08:14:50Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">I see what you mean. At this moment, the glas implementation does not do 
&lt;br&gt;this. It is not that hard to implement this I think. As Neal points out, 
&lt;br&gt;it allows passing arguments by value, which indeed simplifies alot. GLAS 
&lt;br&gt;currently passes arguments by value, except containers. This exception 
&lt;br&gt;would be removed by the mechanism you describe. it would simplify the 
&lt;br&gt;glas implementation as well.
&lt;br&gt;&lt;br&gt;Currently, a view has to be destroyed before the container is destroyed.
&lt;br&gt;&lt;br&gt;I am not sure I understand Neal's comment about storing the count in the 
&lt;br&gt;data. If you allocate a vector of double, would you keep one position in 
&lt;br&gt;the array for the reference count?
&lt;br&gt;&lt;br&gt;There are consequences that should be thought of carefully:
&lt;br&gt;* if v and w are two vectors (or vector views), what does the operation 
&lt;br&gt;w = v do ?
&lt;br&gt;* the storage of vectors and matrices becomes slightly more expensive
&lt;br&gt;&lt;br&gt;I like the idea. Something to think of ...
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br&gt;&lt;br&gt;Bert Rodiers wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello Karl,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In RogueWave they do the following:
&lt;br&gt;&amp;gt; A vector has a view, which on its turn points to the actual data (a 
&lt;br&gt;&amp;gt; C++ data structure aggregating the data).
&lt;br&gt;&amp;gt; When you for example apply a slice on your vector you get a new vector 
&lt;br&gt;&amp;gt; with a different view on the same data (the sharing of the data 
&lt;br&gt;&amp;gt; happens with reference counting, and the view keeps track of the new 
&lt;br&gt;&amp;gt; start, length and stride). The data is cleaned up at the moment no 
&lt;br&gt;&amp;gt; views exist anymore. For matrices and higher dimension structures they 
&lt;br&gt;&amp;gt; also apply this so that when you extract a column from a matrix the 
&lt;br&gt;&amp;gt; data is shared between the original matrix and the vector which was 
&lt;br&gt;&amp;gt; the result of the slice.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Bert
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There you have
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 12/10/2007, *Karl Meerbergen* &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Hi Bert,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; This is the idea of a boost::shared_ptr.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; It is clear that this might help in some cases for improving
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; reliability
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; of code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; If I understand Neal well, the situation could be the following:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; you create a matrix.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Later, you create an object that is a proxy to a row of this matrix.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; If you have reference counting, the programmer can destroy the matrix
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; before the row proxy. Without the reference count, the proxy should be
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; destroyed before the matrix.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; At this stage, this mechanism is indeed not provided. In practice, it
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; would imply adding a boost::shared_ptr in all containers. This is
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; possible, but could it not create undesired overhead?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; One of the great things of generic programming is that we can provide
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; containers and proxies that support reference counting in addition to
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; containers and proxies that do not use reference counting :-)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Karl
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Bert Rodiers wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Hello Karl,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; An example:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; You have a class CVec, the data is stored in seperate class CView to
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; which CVec points. CView also has a reference count. At the
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; moment you
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; create a CVec a CView is recreated with reference count 1, when
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; a new
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; CVec is created from an existing one, the CView is being shared and
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; the reference count is increased (with a function call). When a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; CVec
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; is destroyed, you decrease the reference count (with a function
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; call)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; and when the reference count becomes zero you destroy the object.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; I could point you to books that discuss reference counting in more
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; detail...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Bert
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; On 12/10/2007, *Karl Meerbergen* &amp;lt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;lt;mailto: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;&amp;gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Hi Neal,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; I have not thought of this. I am a bit puzzled. Can you explain
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; what you
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; mean by reference counting? Do you mean that a container
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; will only
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; disappear when all its references by other objects disappear?
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Thanks,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Karl
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Neal Becker wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;I'm looking at the glas alpha docs. &amp;nbsp;I've been studying blitz++
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; recently, and
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;I have (so far) liked the use of reference counting.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;A slice of an array returns a (shared) view of the array
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; data. &amp;nbsp;Reference
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;counting is used for memory management.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;I read the comments in glas regarding assignment vs. copy
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; construction. &amp;nbsp;Have
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;you considered using ref counting instead?
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;_______________________________________________
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;glas mailing list
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; _______________________________________________
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; glas mailing list
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&amp;gt; &amp;lt;mailto:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;_______________________________________________
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;glas mailing list
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; _______________________________________________
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; glas mailing list
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;_______________________________________________
&lt;br&gt;&amp;gt;glas mailing list
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;tt&gt;[Karl.Meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U. Leuven;Department of Computer Science
&lt;br&gt;adr:Room 02.014;;Celestijnenlaan 200A;Heverlee (Leuven);;B-3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;tel;cell:+32 474 26 66 59
&lt;br&gt;note:http://www.kuleuven.be/cwis/email_disclaimer.htm
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13176071&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13176071.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13175681</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-12T07:53:16Z</published>
	<updated>2007-10-12T07:53:16Z</updated>
	<author>
		<name>Neal Becker</name>
	</author>
	<content type="html">On Friday 12 October 2007, Karl Meerbergen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Bert,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is the idea of a boost::shared_ptr.
&lt;br&gt;&amp;gt; It is clear that this might help in some cases for improving reliability
&lt;br&gt;&amp;gt; of code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If I understand Neal well, the situation could be the following:
&lt;br&gt;&amp;gt; you create a matrix.
&lt;br&gt;&amp;gt; Later, you create an object that is a proxy to a row of this matrix.
&lt;br&gt;&amp;gt; If you have reference counting, the programmer can destroy the matrix
&lt;br&gt;&amp;gt; before the row proxy. Without the reference count, the proxy should be
&lt;br&gt;&amp;gt; destroyed before the matrix.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; At this stage, this mechanism is indeed not provided. In practice, it
&lt;br&gt;&amp;gt; would imply adding a boost::shared_ptr in all containers. This is
&lt;br&gt;&amp;gt; possible, but could it not create undesired overhead?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; One of the great things of generic programming is that we can provide
&lt;br&gt;&amp;gt; containers and proxies that support reference counting in addition to
&lt;br&gt;&amp;gt; containers and proxies that do not use reference counting :-)
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Ref counting has a lot of benefits. &amp;nbsp;For example, you can return an array by 
&lt;br&gt;value, without a huge performance impact. &amp;nbsp;Also, a view of an array can be 
&lt;br&gt;treated just the same as an array. &amp;nbsp;This simplifies code.
&lt;br&gt;&lt;br&gt;Ref counting can be bolted-on using shared_ptr, but that has greater cost 
&lt;br&gt;(shared_ptr has to allocate on heap a count). &amp;nbsp;You want the ref count to be 
&lt;br&gt;included in the memory object to reduce the cost. &amp;nbsp;Also, without ref 
&lt;br&gt;counting, I believe you need to distinguish between destroying an array 
&lt;br&gt;(which owns the memory) and a view (which does not). &amp;nbsp;This code becomes 
&lt;br&gt;redundant if you have ref counting built in.
&lt;br&gt;&lt;br&gt;I find the separation of the memory component and the 'view of memory' (array) 
&lt;br&gt;that blitz++ uses to be useful. &amp;nbsp;I haven't looked at the glas design yet.
&lt;br&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175681&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13175681.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13175661</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-12T07:53:00Z</published>
	<updated>2007-10-12T07:53:00Z</updated>
	<author>
		<name>Bert Rodiers</name>
	</author>
	<content type="html">Hello Karl,&lt;br&gt;&lt;br&gt;In RogueWave they do the following:&lt;br&gt;A vector has a view, which on its turn points to the actual data (a C++ data structure aggregating the data).&lt;br&gt;When you for example apply a slice on your vector you get a new vector with a different view on the same data (the sharing of the data happens with reference counting, and the view keeps track of the new start, length and stride). The data is cleaned up at the moment no views exist anymore. For matrices and higher dimension structures they also apply this so that when you extract a column from a matrix the data is shared between the original matrix and the vector which was the result of the slice.
&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;Bert&lt;br&gt;&lt;br&gt;&lt;br&gt;There you have &lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;span class=&quot;gmail_quote&quot;&gt;On 12/10/2007, &lt;b class=&quot;gmail_sendername&quot;&gt;Karl Meerbergen&lt;/b&gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175661&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;&amp;gt; wrote:&lt;/span&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;Hi Bert,&lt;br&gt;&lt;br&gt;This is the idea of a boost::shared_ptr.&lt;br&gt;It is clear that this might help in some cases for improving reliability
&lt;br&gt;of code.&lt;br&gt;&lt;br&gt;If I understand Neal well, the situation could be the following:&lt;br&gt;you create a matrix.&lt;br&gt;Later, you create an object that is a proxy to a row of this matrix.&lt;br&gt;If you have reference counting, the programmer can destroy the matrix
&lt;br&gt;before the row proxy. Without the reference count, the proxy should be&lt;br&gt;destroyed before the matrix.&lt;br&gt;&lt;br&gt;At this stage, this mechanism is indeed not provided. In practice, it&lt;br&gt;would imply adding a boost::shared_ptr in all containers. This is
&lt;br&gt;possible, but could it not create undesired overhead?&lt;br&gt;&lt;br&gt;One of the great things of generic programming is that we can provide&lt;br&gt;containers and proxies that support reference counting in addition to&lt;br&gt;containers and proxies that do not use reference counting :-)
&lt;br&gt;&lt;br&gt;Karl&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Bert Rodiers wrote:&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello Karl,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; An example:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; You have a class CVec, the data is stored in seperate class CView to&lt;br&gt;&amp;gt; which CVec points. CView also has a reference count. At the moment you
&lt;br&gt;&amp;gt; create a CVec a CView is recreated with reference count 1, when a new&lt;br&gt;&amp;gt; CVec is created from an existing one, the CView is being shared and&lt;br&gt;&amp;gt; the reference count is increased (with a function call). When a CVec
&lt;br&gt;&amp;gt; is destroyed, you decrease the reference count (with a function call)&lt;br&gt;&amp;gt; and when the reference count becomes zero you destroy the object.&lt;br&gt;&amp;gt; I could point you to books that discuss reference counting in more
&lt;br&gt;&amp;gt; detail...&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Regards,&lt;br&gt;&amp;gt; Bert&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; On 12/10/2007, *Karl Meerbergen* &amp;lt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175661&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;lt;mailto:
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175661&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;&amp;gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hi Neal,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have not thought of this. I am a bit puzzled. Can you explain&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; what you
&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mean by reference counting? Do you mean that a container will only&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disappear when all its references by other objects disappear?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Karl&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Neal Becker wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;I&amp;#39;m looking at the glas alpha docs.&amp;nbsp;&amp;nbsp;I&amp;#39;ve been studying blitz++&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; recently, and&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;I have (so far) liked the use of reference counting.
&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;A slice of an array returns a (shared) view of the array&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data.&amp;nbsp;&amp;nbsp;Reference&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;counting is used for memory management.&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;I read the comments in glas regarding assignment vs. copy
&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; construction.&amp;nbsp;&amp;nbsp;Have&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;you considered using ref counting instead?&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;_______________________________________________&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;glas mailing list&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175661&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175661&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas
&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _______________________________________________&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; glas mailing list&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175661&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt; &amp;lt;mailto:
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175661&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;------------------------------------------------------------------------
&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;_______________________________________________&lt;br&gt;&amp;gt;glas mailing list&lt;br&gt;&amp;gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175661&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&lt;br&gt;&amp;gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;
http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________&lt;br&gt;glas mailing list&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175661&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;
http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175661&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13175661.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-13175431</id>
	<title>Re: Reference counting?</title>
	<published>2007-10-12T07:36:52Z</published>
	<updated>2007-10-12T07:36:52Z</updated>
	<author>
		<name>Karl Meerbergen-2</name>
	</author>
	<content type="html">Hi Bert,
&lt;br&gt;&lt;br&gt;This is the idea of a boost::shared_ptr.
&lt;br&gt;It is clear that this might help in some cases for improving reliability 
&lt;br&gt;of code.
&lt;br&gt;&lt;br&gt;If I understand Neal well, the situation could be the following:
&lt;br&gt;you create a matrix.
&lt;br&gt;Later, you create an object that is a proxy to a row of this matrix.
&lt;br&gt;If you have reference counting, the programmer can destroy the matrix 
&lt;br&gt;before the row proxy. Without the reference count, the proxy should be 
&lt;br&gt;destroyed before the matrix.
&lt;br&gt;&lt;br&gt;At this stage, this mechanism is indeed not provided. In practice, it 
&lt;br&gt;would imply adding a boost::shared_ptr in all containers. This is 
&lt;br&gt;possible, but could it not create undesired overhead?
&lt;br&gt;&lt;br&gt;One of the great things of generic programming is that we can provide 
&lt;br&gt;containers and proxies that support reference counting in addition to 
&lt;br&gt;containers and proxies that do not use reference counting :-)
&lt;br&gt;&lt;br&gt;Karl
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Bert Rodiers wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello Karl,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; An example:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You have a class CVec, the data is stored in seperate class CView to 
&lt;br&gt;&amp;gt; which CVec points. CView also has a reference count. At the moment you 
&lt;br&gt;&amp;gt; create a CVec a CView is recreated with reference count 1, when a new 
&lt;br&gt;&amp;gt; CVec is created from an existing one, the CView is being shared and 
&lt;br&gt;&amp;gt; the reference count is increased (with a function call). When a CVec 
&lt;br&gt;&amp;gt; is destroyed, you decrease the reference count (with a function call) 
&lt;br&gt;&amp;gt; and when the reference count becomes zero you destroy the object.
&lt;br&gt;&amp;gt; I could point you to books that discuss reference counting in more 
&lt;br&gt;&amp;gt; detail...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Bert
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 12/10/2007, *Karl Meerbergen* &amp;lt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175431&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175431&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Hi Neal,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I have not thought of this. I am a bit puzzled. Can you explain
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; what you
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; mean by reference counting? Do you mean that a container will only
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; disappear when all its references by other objects disappear?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Thanks,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Karl
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Neal Becker wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;I'm looking at the glas alpha docs. &amp;nbsp;I've been studying blitz++
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; recently, and
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;I have (so far) liked the use of reference counting.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;A slice of an array returns a (shared) view of the array
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; data. &amp;nbsp;Reference
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;counting is used for memory management.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;I read the comments in glas regarding assignment vs. copy
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; construction. &amp;nbsp;Have
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;you considered using ref counting instead?
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;_______________________________________________
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;glas mailing list
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175431&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175431&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; _______________________________________________
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; glas mailing list
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175431&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175431&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;_______________________________________________
&lt;br&gt;&amp;gt;glas mailing list
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175431&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;tt&gt;[Karl.Meerbergen.vcf]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;begin:vcard
&lt;br&gt;fn:Karl Meerbergen
&lt;br&gt;n:Meerbergen;Karl
&lt;br&gt;org:K.U. Leuven;Department of Computer Science
&lt;br&gt;adr:Room 02.014;;Celestijnenlaan 200A;Heverlee (Leuven);;B-3001;Belgium
&lt;br&gt;email;internet:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175431&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.Meerbergen@...&lt;/a&gt;
&lt;br&gt;tel;work:+32 16 32 79 59
&lt;br&gt;tel;fax:+32 16 32 79 96
&lt;br&gt;tel;cell:+32 474 26 66 59
&lt;br&gt;note:http://www.kuleuven.be/cwis/email_disclaimer.htm
&lt;br&gt;url:http://www.cs.kuleuven.be/~karlm
&lt;br&gt;version:2.1
&lt;br&gt;end:vcard
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;glas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=13175431&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/glas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/glas&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reference-counting--tp13173991p13175431.html" />
</entry>

</feed>
