View Single Post
Old 07-18-2012, 10:33 AM   #43
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by knc1 View Post
Here is a simple bit of math, good for someone (like me) who has never written VFP code.

We know that an array can be accessed by its member index.
We know that an array in C is just a pointer to the first (0) member.
We know that other fft implementations use either a lookup table or hard code something to "bit reverse" the member index numbers.
We know that C allows us to do "pointer math".
We know the VFP does not do "indexed load/store".

But it certainly does scaler, vector math.

We know the address of a member is: Maddr = (base + (index * (size_of(member)))
So how do we do "pointer math" for an 8 member array as a vector?

For an 8 element array, the bit reverse relationship looks like:
Fixed now
http://drpbox.knetconnect.com/fft/bits.html

Hmm (the intended algorithm, not the actual code) ...
* fill multiple with (size_of(member)) - bank 0
* load multiple with "magic index" - bank 1
* mul bank-0 bank-1 bank-0
* fill multiple with (array base) - bank 1
* add bank-0 bank-1 bank-0
and like magic we now have the pointer addresses in S0 .. S7 of the reordered input array.

C "pointer math" on steroids

Ooh. pretty...

It would seem my wine installation is Dead beyond recovery after several hours of digging around in registries. I have reported the bug (and found 4 other users who shared my experience, what a joy it is to belong)

To that end I shall be now wasting 4 hours doing this all again under Linux ; )
twobob is offline   Reply With Quote