Boost logo

Ublas :

Subject: Re: [ublas] Patch/proposal for overloading operator * in ublas
From: K.M.A.Chai_at_[hidden]
Date: 2009-09-10 13:04:31


Rutger ter Borg wrote:
> * full serialization / pretty printing / etc. support

(Apologies for the multiple posts; I've got the subject header wrong so
that it doesn't thread properly in the previous post).

I beg to diff. I think pretty printing is pretty individual. Currently, I use
an sed script to transform the ublas outputs on the console to something I can
understand easily.

For serialization, the use of matlab mat formats, boost serialization, hdf5 or
simply csv/ascii is also quite application specific. I think the proper place
is to overload ostream<< and istream>> for individual formats.

That said, would it be worthwhile to have a set of io-manipulators for ublas
outputs? For example, to specify if the row delimiter is "),(" or '\n'. I can
put in some patch for this from my previous code if there is interest.

> * support mixed-memory models (RAM / RAM of GPU board)
> * support distributed / parallel containers

I think these are pretty hard to achieve in C++, given that the semantics of
this is still to be define properly in the language. For example, we have to
wait until C++0x to have multi-threading in the language/library.
Hence, I think the proper place for this is in vendor supplied libraries, or in
specially tailored plugins.

> 2) Take the uBLAS expressions are they are after some revisions that have
> been suggested. Provide a reference implementation for these expressions.

Is ublas not a reference implementation?

> Make them easy to code against and extend with own functionality: rewrite
> based on Boost.Proto. Create a plugin archhitecture that enables expression
> tree inspection and rewrites. This is certainly worth a library, too.

the usebindings facility in the library I've posted previously at
http://lists.boost.org/MailArchives/ublas/2009/08/3615.php is a humble attempt
at reparsing ublas expressions. It is pretty messy, and would properly be
neater if ublas has been designed for such "peeking into expression tree" in
mind.

My view is that ublas is a library to access BLAS convienently in C++, and not
a general matrix manipulation library. In this light, I think ublas does a
rather good job.

Also, other people on the list might be interested in FLENS at
http://flens.sourceforge.net/.

Kian Ming

PS: how does one reply individual posts if one is on the daily digest mode?

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.