Bart van Ingen Schenau wrote, On 07/05/08 14:05:
That does not show that uint_fast8_t is wrong.
But is also does not show that 'int' is wrong. That is my whole point.
An algorithm that you might want running on either a small embedded
processor or a high powered graphics workstation is one to work out the
optimum brightness/contrast setting for an image based on some
statistics. I know you might want it on a small processor because I had
to implement it on one and then later port it to another smaller
processor (in both cases HW collected the statistics, I only had to
process them in real time), and the use on a high powered graphics
workstation should be obvious. The same can apply to some other image
processing algorithms, so it does happen.
Yes, it does happen.
But do you use identical implementations of the algorithm for both the
low-powered and the high-powered device, or do you use different
implementations that make the best use of the capabilities of the
processor?
When implementing an algorithm for a high-powered architecture, do you
take it into account that the same algorithm might one day be useful
on a low-powered device (possibly without efficient floating point
support)? Or do you do it only if you already know that the code will
be ported to such a device?
My point is that supporting low-powered devices takes a lot more than
just selecting the right integer types.
Bart v Ingen Schenau