Valarrays and [altivec] vectors (was Re: [PATCH]: Handle vector modes in genopinit.c, c-typeck.c)

Phil Edwards pedwards@disaster.jaj.com
Fri Nov 30 11:41:00 GMT 2001


On Fri, Nov 30, 2001 at 12:23:58PM +0100, Gabriel Dos Reis wrote:
> | > Can operations be applied between valarrays of different lengths?
> | 
> | Undefined behavior.  I think the current implementation formats the user's
> | hard drive.
> 
> Exact :-)

I keep forgetting to commit the autoconf tests which determine the
exact function to call in order to format the hard drive.  Right now the
formatting occurs largely by luck, but this should be standardized for 3.1,
and perhaps wrapped in a __format_hard_drive dispatcher.


> However two valarray<T>s can be be used in equality or relational
> comparaisons, the operation is componentwise and the result is a
> valarray<bool>. One can also apply directly boolean operators to
> valarray<bool>s, 

I didn't know that.  That's pretty neat.  :-)


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams



More information about the Gcc-patches mailing list