>>>>> «David», David Banks wrote: David> Hi, David> Do you have a reference or further explaination for this statement? David> As near as I can tell, Blitz could be extremely useful as the compilers David> are catching up to it. Maybe you see a problem in using it with unstructured/ David> adaptivly refined meshes while it could come in very handy for structured David> and overset/chimera) paradigms? Or is there something I'm missing and the David> results quoted really aren't as good as they appear due to some paralyzing David> constraint? Blitz behaves very well for *medium arrays* and is very *clean* from a pure C++ programmer view point. But (like valarray) blitz was not primarly designed to serve the scientific computing community *but* to provide an answer to a problem in C++. In that it succeeded (illustrating use of expression template). The purpose of valarray was to provide building blocks but it failed (for ex. almost every binary fonction taking a valarray object an a builtin type does take a *const reference* on the builtin type which is the most inefficient way to do things. One might have expected to see a use of traits to decide value/const ref according to sizeof of the type). Furthermore some *fondamental* functions are missing (a mathematically sound inner product on valarrays; why do we have valarray<>::sum() and not valarray<>::product() ?) Blitz choises (for reasons I can undestand) not to give the same meaning to the copy-ctor and the copy-assignment operator. This does not only encourages aliasing (which prevents parallelism) but also is error-prone. Below, I included an e-mail form Dag giving his impression on the start of the art. David> -Dave Banks David> Cislunar Aerospace, inc David> dbanks@cislunar.com -- Gabriel Dos Reis | Ecole Normale Superieure de Cachan INRIA, Unite de Recherche de | Centre de Mathematiques et de Leurs Sophia Antipolis | Applications Projet SAGA | Equipe de Geometrie ------- start of forwarded message (RFC 934 encapsulation) ------- Return-Path: Received: from net.dynasim.se (root@net.dynasim.se [192.16.137.60]) by piano.dptmaths.ens-cachan.fr (8.8.8/jtpda-5.2) with ESMTP id PAA24587 for ; Wed, 18 Mar 1998 15:51:49 +0100 (MET) Received: from dag-nt (dag-nt.dynasim.se [194.103.53.10]) by net.dynasim.se (8.8.8/8.8.8) with SMTP id PAA02644; Wed, 18 Mar 1998 15:54:55 +0100 Message-Id: <3.0.5.32.19980318155725.00960d30@194.103.53.1> X-Sender: dag-pop@194.103.53.1 X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32) In-Reply-To: <199803171653.RAA12584@piano.dptmaths.ens-cachan.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Filter: mailagent [version 3.0 PL44] for dosreis@piano.ens-cachan.fr From: Dag Bruck To: Gabriel Dos Reis Cc: bs@research.att.com Subject: Re: Numerics with C++ Date: Wed, 18 Mar 1998 15:57:25 +0100 Dear Gabriel, At 17:53 1998-03-17 +0100, you wrote: > >Hello, >=09 > I am working on the class valarray from the C++ Standard >Library. I discussed with Bjarne Stroustrup in Nice (France) last week >about the implementation of valarray. He gave me your email suggesting=20 >to get in touch with you because you're specialist of numerics in both >Fortran and C++. So I'm there. I think that Bjarne Stroustrup was perhaps a little too enthusiastic about my capabilities, but the company I work for is heavily involved in efficient numerical simulation and we are right now looking at C/C++ matrix libraries. > I would like to know if you're aware of an implementation of >numerics library (other than Blitz++, TNT) in C++ that exhibits good >performance. Would it be possible you give an explanation of technics >you use ? What is the right library of course depends on your particular needs, and ours are quite general, including LU and QR decomposition, handling of sparse matrices etc. Another important aspect is a FORTRAN-compatible storage format, because our customers want to interface to existing libraries or code generated by f2c. We have looked at several libraries, and currently we are probably most interested in a package called Meschach ( ftp://ftpmaths.anu.edu.au/pub/meschach/meschach.html ) because of its overall functionality. The Blitz++ package is probably the most exciting from a C++ perspective, and should give very good performance for medium-sized matrices. Maybe there are problems to get it to run on current compilers. The TNT library is also quite good, and I know people who have used it with great success. Here are some additional comments by a colleague of mine, Martin Otter: - ----------------------------------------------------------------------------= - - I downloaded the TNT library when searching for sparse matrix=20 packages, but presently it seems to be that no useful operations are provided (no sparse LU decomposition,=20 even no dense LU decomposition). I looked at the packages on which TNT is based. These are packages for dense matrices (LAPACK) and iterative sparse matrix packages but no direct sparse matrix package for general matrices.=20 I therefore have the feeling, that direct sparse matrix support will not be available or if they plan to do it, it will come quite late, because they will first implement the stuff they are familiar with. The problem with iterative sparse matrix schemes is that no methods seems to be known which work for all types of systems (which is of course very important for a tool such as Dymola). Direct sparse matrix schemes seem to be much more robust with respect to the system to be solveed. On the other hand, very big systems (dim > 100 000) seem to be only solvable by iterative methods. - ----------------------------------------------------------------------------= - - In our application, symbolic transformations that take advantage of zero elements results in runtime performance that a pure numerical approach cannot match. Our product is an object-oriented modeling and simulation environment for large continuous systems (with discrete events). If we are primarily interested in implementing valarray, TNT is probably a good choice. Best regards, Dag Br=FCck - -- Dynasim AB Phone: +46 46 182500 Research Park Ideon FAX: +46 46 182501 S-223 70 Lund E-mail: dag@Dynasim.se Sweden URL: http://www.Dynasim.se ------- end -------