On Tuesday, June 17, 2003, at 06:59 AM, Peter Dufault wrote:
Could you describe the flavor of algorithms you require so we can get
a feel how the Altivec will compare with a DSP?
Peter
_______________________________________________
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.
I use the built-in DSP on the NeXT to count photons and turn on and off
a number of digital signals used to control an experiment. This is all
integer and logical stuff (no FP) and is done in assembler on the DSP.
It has the advantages of being extremely fast (the 56k can do at least
one operation during each of its 40 ns clock cycles) and is independent
of the main CPU. On the NeXT, communication with the DSP is at memory
speeds - very fast. The DSP is tailored to processing *signals*, which
are integers with the binary point on the left (so that they are
actually numbers between +1 and -1). This causes a lot of confusion for
beginning DSP programmers; for example, loading a 24 bit register with
a byte results in the byte going into the upper third of the register.
It is definitely a fairly special purpose processor (though it can be
used for general purposes, with some clumsiness).
I use altivec to speed up programs in which the same sequence of
operations is applied to many sets of independent data. For example, I
wrote an optical design ray-tracing program which traces up to 30,000
rays through an arbitrary series of lenses, mirrors, etc. This is a
natural candidate for speed-up using altivec, since the rays are all
independent of each other. I took the fortran program (G77), converted
it to C using f2c and rewrote all of the operations using vectors - the
improvement was the expected factor of 4 (for single precision FP). The
altivec unit can speed up anything which allows this kind of
parallelism to be applied to simple operations (+,-,*,reciprocal
estimate and square root estimate).
These are not exactly algorithms, but do illustrate what I mean by the
different uses for DSPs and altivec.
-wn
_______________________________________________
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.