Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Altivec: Extracting Floats From Vector Float



Does anyone know approximately how many clock cycles it takes to copy
the memory from the vector register to the scalar register?... At least
compared to something like vec_madd()?

Roger

-----Original Message-----
From: email@hidden
[mailto:email@hidden] On Behalf Of Roger Kylin
Sent: Friday, April 02, 2004 6:32 AM
To: 'Paul Sargent'
Cc: email@hidden
Subject: RE: Altivec: Extracting Floats From Vector Float


The basic problem I am doing is tracking a point through a 3D volume. I
am vectorizing the search for the 3-space indices that the point traces
through.  For the problem (poorly described here) this is quite
reasonable.  What I am extracting from the vectors are the indices that
need to be incremented.  Even with the vector->scalar conversion, I'm
still getting a 2X speed-up over the non-vector version... But that
conversion is nagging... I just don't think I can avoid it.

Roger

-----Original Message-----
From: email@hidden
[mailto:email@hidden] On Behalf Of Paul Sargent
Sent: Thursday, April 01, 2004 8:25 PM
To: Roger Kylin
Cc: email@hidden
Subject: Re: Altivec: Extracting Floats From Vector Float


On 1 Apr 2004, at 13:24, Roger Kylin wrote:

> What is the fastest way to get the four scalar floats out of an
> altivec vector float?

I believe the only way the processor can do this is to write the vector 
out to memory (or at least to cache) and then read it back in. Not 
quick.

> I currently a procedure similar to the FillVectorFloat described on
> Apple's website.  Essentially, I form a union between the vector 
> float, and a vector of four floats, and return the floats.

...and that's how you tend to write it in C.


> This process is buried deep inside my inner loops... Can it be sped
> up?

Best way to speed it up is not to do it. Seems like an odd thing to be 
trying speed up...moving data out of the nice fast vector unit into the 
scaler unit.

Paul
_______________________________________________
scitech mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/scitech
Do not post admin requests to the list. They will be ignored.
_______________________________________________
scitech mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/scitech
Do not post admin requests to the list. They will be ignored.
_______________________________________________
scitech mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/scitech
Do not post admin requests to the list. They will be ignored.


References: 
 >RE: Altivec: Extracting Floats From Vector Float (From: "Roger Kylin" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.