[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: atlas-comm@cs.utk.edu*Subject*: Re: altivec: how to load a scalar.*From*: Nicholas Coult <coult@augsburg.edu>*Date*: Wed, 25 Jul 2001 17:39:59 -0500*In-Reply-To*: <Pine.LNX.4.21.0107251719560.16440-100000@torc19.cs.utk.edu>*References*: <Pine.LNX.4.21.0107251719560.16440-100000@torc19.cs.utk.edu>

> >However, I need one thing to get my algorithm working: I need to load a >scalar into a vector register and zero all other elements in the vector. >It does not matter where in the vector the scalar element ends up. > >I looked at the lvewx instruction that does exactly that, however the >values at the positions in the vector that is not occupied by the scalar >are undefined after the load, and not zero. > If you have a zero vector handy, you could use vsel to create a new vector with 3 elements selected from the zero vector and the one desired element from the other vector. -- Nicholas Coult, Ph.D., web: http://melby.augsburg.edu/~coult Assistant Professor, Department of Mathematics, Augsburg College coult@augsburg.edu, phone: (612) 330-1064 office: Science Hall 137B

**References**:**altivec: how to load a scalar.***From:*Peter Soendergaard <soender@cs.utk.edu>

- Prev by Date:
**Re: altivec: how to load a scalar.** - Next by Date:
**altivec kernels** - Prev by thread:
**altivec: how to load a scalar.** - Next by thread:
**Re: repeat you test on P4** - Index(es):