Jerry Coffin wrote:
> In article <a47fac46-bb33-4608-bd97-
> f75cd419340f@[EMAIL PROTECTED]
>,
> gherdovich@[EMAIL PROTECTED]
says...
>
> [ ... ]
>
>> Another user answers with what I find a more reasonable argument:
>> std::valarray<> was designed to meet the characteristic of vector
>> machines, like the Cray. If you don't have the Cray, there is
>> no point in doing math with valarray<> and related operators.
>
> In theory that's right: the basic idea was to provide something that
> could be implemented quite efficiently on vector machines. In fact, I've
> never heard of anybody optimizing the code for a vector machine, so it
> may be open to question whether it provides any real advantage on them.
During the mid-90s both C and C++ were involved in adding features that
would sup****t numerically intense programming. Unfortunately a couple of
years later the companies whose numerical experts doing the grunt work
withdrew sup****t. By hindsight it might have been better to have shelved
the work but both WG14 and WG21 opted to continue hoping that they would
still produce something useful.
It is not obvious to those outside the numerical fields that actually
developing things like complex number sup****t, sup****t for array
arithmetic etc. is fraught with subtle traps.
>
> OTOH, valarray _can_ make some code quite readable, so it's not always a
> complete loss anyway.
>
--
Note that robinton.demon.co.uk addresses are no longer valid.


|