This site is no longer active and is available for archival purposes only. Registration and login is disabled.

How do you implement fixed point data type


How do you implement fixed point data type

Postby rangers99 » Jan 20, 2003 @ 9:52am

Hi guys

I am porting graphics code that runs on a PC over to an IPAQ. I understand there is no floating point coprocessor on the IPAQ. Therefore I need to convert my floating point stuff to fixed point stuff otherwise the performance will be poor.

Can anyone give some pointers (example code or even links) as to how this is done? Ive tried searching this forum but have had no joy yet. cheers
rangers99
pm Member
 
Posts: 7
Joined: Jan 20, 2003 @ 9:45am


Postby MirekCz » Jan 20, 2003 @ 10:23am

there is something in forum
you can check easyce functions for some functions that use it

use google to search

there's also an article on arm site about it. www.arm.com , somewhere on forum there's also a direct link to it
With best regards,
Mirek Czerwinski
User avatar
MirekCz
pm Member
 
Posts: 269
Joined: Sep 18, 2001 @ 6:42pm
Location: Poland,city Poznań


Postby Digby » Jan 20, 2003 @ 7:24pm

Here's a link to the whitepaper from ARM's website:



You might also want to investigate Intel's Graphics Performance Primitives for XScale. They have implemented fixed point math in optimized ARM assembly language:

Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby rangers99 » Jan 21, 2003 @ 7:21am

many thanks for the very helpful replies guys.
rangers99
pm Member
 
Posts: 7
Joined: Jan 20, 2003 @ 9:45am


Postby rangers99 » Jan 21, 2003 @ 7:26am

A related question.

How come when I port my code over from a PC to a PocketPC the fractional parts of floats are not recognised? ie. A float of 3.3 on my PC becomes a float of 3.0 on the PocketPC.

I was under the impression that the code should work OK on the PocketPC but would just be very slow since there is no floating point hardware.

I have a really big bit of code that uses floats and the fractional parts are very important. Is using fixed point notation the only answer? Or is there some project setting Im not aware of?
rangers99
pm Member
 
Posts: 7
Joined: Jan 20, 2003 @ 9:45am


Postby refractor » Jan 21, 2003 @ 9:29am

Floats should work fine - there's no CPU but the system emulates the FPU calls.

Post some code that shows the floats are broken..?
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby rangers99 » Jan 22, 2003 @ 11:13am

you're correct. bugs in my code
rangers99
pm Member
 
Posts: 7
Joined: Jan 20, 2003 @ 9:45am


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum