Home > Archive > Compression > January 2007 > A coder which uses FPU a lot
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
A coder which uses FPU a lot
|
|
| tomekwr@gmail.com 2007-01-19, 6:55 pm |
| Hi,
I had to write a class which would emulate FPU using normal fixed point
operations, and to test it in some real application. I thought about
some encoding programs but I don't have much idea, which one would be
suitable. I mean that 1. it would use FPU a lot - to be able to see
some difference in time, 2. it would be relatively easy to change the
source code to accept my class (which is written in C++). If you've got
any idea, please help, I would really appreciate it.
Thanks in advance
Tomek W.
| |
| Thomas Richter 2007-01-19, 6:55 pm |
| tomekwr@gmail.com wrote:
> Hi,
>
> I had to write a class which would emulate FPU using normal fixed point
> operations, and to test it in some real application. I thought about
> some encoding programs but I don't have much idea, which one would be
> suitable. I mean that 1. it would use FPU a lot - to be able to see
> some difference in time, 2. it would be relatively easy to change the
> source code to accept my class (which is written in C++). If you've got
> any idea, please help, I would really appreciate it.
One of the "classical" test cases for FPU code and number crunching is
the fast Fourier transformation and its "relatives", the DCT. Another
standard problem is that of convolution filtering, i.e. filter an audio
signal by means of a given filter.
Other ideas would include a DWT (also basically a convolution filter),
or try to compute the Mandelbrot set, which would also test for the
precision of the implementation....
So long,
Thomas
| |
| cr88192 2007-01-20, 3:55 am |
|
<tomekwr@gmail.com> wrote in message
news:1169215109.087868.283330@q2g2000cwa.googlegroups.com...
> Hi,
>
> I had to write a class which would emulate FPU using normal fixed point
> operations, and to test it in some real application. I thought about
> some encoding programs but I don't have much idea, which one would be
> suitable. I mean that 1. it would use FPU a lot - to be able to see
> some difference in time, 2. it would be relatively easy to change the
> source code to accept my class (which is written in C++). If you've got
> any idea, please help, I would really appreciate it.
>
this seems dubious IMO (assuming the goal is performance).
unless you are intending to run code on some arch otherwise lacking an FPU
(the alternative being emulation), I wouldn't expect to see much (if any)
speedup (and possibly enough overhead to cover up for any real gain).
part of the reason here is that fixed-point arithmetic is fussy, and usually
is only really used in specific and controlled situations (where one is
careful to avoid generating extra operations, such as shifts, implied by the
basic nature of fixed point).
additionally, unlike floats, one no longer has a near-arbitrary range, and
so certain things, such as the exact number of bits above and below the
decimal point, become very important concerns, and one typically considers
these issues carefully.
additionally, it can be noted that in many cases, floats are nearly as fast
as integers anyways.
so, a generic (presumably naive) class-based implementation is unlikely to
give satisfactory results.
I could be wrong on all this, this is mostly just my expectation.
> Thanks in advance
> Tomek W.
>
|
|
|
|
|