Topic: Std. c++ for number crunching.


Author: matt@godzilla.EECS.Berkeley.EDU (Matt Austern)
Date: 1995/08/29
Raw View
Distribution:
In article <9508291233.AA14795@dhow.vr.dnv.no> helm@dhow.vr.dnv.no (Jens Bloch Helmers) writes:

> Has the committee considered to include standardized math
> libraries? (Linear Algebra, mathematical functions etc.)
>
> Does Std. c++ introduce features which make it easier
> for a compiler to exploit parallel processing?
> (Like the new array syntax improves Fortran)

Yes and no.  The draft standard does include a number of features that
are of interest to people who do numerical programming (see, in
particular, chapter 26, which describes the Numerics Library), but it
is not as extensive as what you get in Fortran and there are still
some major omissions.

First, a brief summary of what the standard does include: complex
numbers, the basic transcendental functions (for both real and complex
arguments), methods of getting access to low-level details of the
machine's representation of floating-point numbers, one-dimensional
arrays of numeric types that are designed for easy vectorization, a
rather extensive set of operations and auxiliary classes dealing with
slices of those arrays, and generalized numeric operations on ordinary
STL containers.

Some of the main things that the standard does not include are
libraries for specialized fields of numerical analysis (linear
algebra, optimization, integration and quadrature, FFTs, etc.) and
multidimensional arrays.

My own opinion is that it's appropriate to leave out the specialized
libraries, since it would be too hard to provide a standard that met
everyone's needs.  I regard the lack of a standard multidimensional
array class, though, as an unfortunate omission.  valarray<T> (and the
associated auxiliary classes) provides a lot of the building blocks
you need to write multidimensional arrays yourself, but that's no real
substitute for a standardized class.  This omission will make it
harder to write portable programs.
--
  Matt Austern                             He showed his lower teeth.  "We
  matt@physics.berkeley.edu                all have flaws," he said, "and
  http://dogbert.lbl.gov/~matt             mine is being wicked."

---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]