Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > A program to test efficiency of emulated FPU

Reply
Thread Tools

A program to test efficiency of emulated FPU

 
 
tomekwr@gmail.com
Guest
Posts: n/a
 
      01-19-2007
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.

(this was posted to comp.compression, too)

 
Reply With Quote
 
 
 
 
kwikius
Guest
Posts: n/a
 
      01-19-2007

(E-Mail Removed) 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.
>
> Thanks in advance
> Tomek W.


Hows about applying some transform matrices to sets of points templated
on your fixed point types, versus floats, doubles etc.

regards
Andy Little

 
Reply With Quote
 
 
 
 
=?iso-8859-1?q?Erik_Wikstr=F6m?=
Guest
Posts: n/a
 
      01-19-2007
On Jan 19, 3:02 pm, (E-Mail Removed) 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.


It might be of interest to compare different kinds of operations, for
example + and - are usually quite fast (talking float/double here)
while * and / can take some time. So perhaps you can start of by
creating some synthetic benchmarks, use some random routine to produce
a list of say 1000 FP numbers, for each of them create a double version
and a yourtype version and put them in an array. Then comes the
benchmark: first measure the time it takes to perform some operation
(summing) the doubles then measure the time needed to do the same
operation on your types.

If you want more realistic benchmarks try finding an algorithm for
solving systems of linear equations and implement it. Use a typedef for
the type used in the calculations so you can easily switch (given that
yourtype have similar interface as float/double) and then download a
matrix from the next and try to solve the system (it's a O(n^3)
operation for simple algorithms). I'd recommend a matrix of size
somewhere between 500x500 to 5000x5000, it's better to run the test
many times than taking a too large matrix.

--
Erik Wikström

 
Reply With Quote
 
tomekwr@gmail.com
Guest
Posts: n/a
 
      01-19-2007
Thank you for your answers very much, but my problem is that I have to
link it wit some real application, which does some real task, like
encoding something, and I'm looking for one, that'd be suitable for
that. Sorry, maybe the post was a lil offtopic.

Thanks!
Tomek W.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
open source C/C++ program doing FPU calculations kot.behemotspam@gmail.com Computer Support 1 01-20-2008 01:04 AM
open source C/C++ program doing FPU calculations kot.behemotspam@gmail.com C Programming 0 01-19-2008 11:49 PM
What FPU intructions JDK support Dimitri Ognibene Java 7 05-03-2006 12:37 PM
J2ME/ktoolbar: Send an sms to an emulated J2ME-App Markus Java 4 02-12-2005 01:20 PM
test test test test test test test Computer Support 2 07-02-2003 06:02 PM



Advertisments