[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] News and updates
DeviPrasad Natesan wrote:
> "The HW acceleration is for single precision only - using doubles
> (including literal constants like 2.0), will force calls to the software
> libraries. Since uClibc's math library does everything with doubles,
> you won't see a lot of speedup on things like trig functions. However
> you will see instant 20-100X speedup on raw floating point arithmetic in
> your apps."
> Does that mean all the double precision floating point will be
> converted to single precision by the library to calculate the result.?
No - in fact the opposite. the uClibc math libraries are all double, so
unfortunately gain no benefit from the HW FPU.
> I am running ntpd which has lots of double. So putting a FPU in the
> microblaze, does it increase the speed.?
No. To gain the benefit from the single precision FPU, you need to
audit your application code to change doubles into floats. You also
need to change constants into explicit floats, like this:
Note the explicit cast of the constant 2.5 to a float - otherwise the
compiler will promote myval to a double, do a (software) double
precision multiply, then truncate the result back to a float - not what
microblaze-uclinux mailing list
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/