[CM] Reducing S7 'real' precision
Elijah Stone
elronnd at elronnd.net
Wed Dec 22 16:24:35 PST 2021
I was doing some stuff with opengl and so made the same modification to
avoid conversions at edges. I did not notice any odd behaviour. (But, I
did not ultimately end up doing much with that project; so there may be
edge cases.)
Assuming that s7 works on 32-bit systems, it must already handle the case
where an s7_double is not the same size as a pointer. So I would be
surprised if there were serious issues.
-E
On Wed, 22 Dec 2021, Woody Douglass wrote:
> Bill et all --
>
> I've been using S7 for doing CV and graphics work; this work often
> involves giant lookup tables (5 terms per pixel, 9600x4800 resolution,
> each table ends up being ~1.8 Gigabytes)
> I can cut that in half by using floats instead of doubles (Precision
> isn't a really important factor here)
>
> these lookup tables are currently implemented as s7 float-vectors
>
> I'm finding myself tempted to patch s7.h with this:
> typedef float s7_double;
>
> but it *feels* like i'm going to get myself into trouble. Has anyone
> tried reducing s7's floating-point precision, or am i falling into a
> dangerous rabbit-hole here? should i just reimplement my tables as C-
> objects and move on?
>
> Any advice would be greatly appreciated!
>
> Thanks,
> Woody Douglass
>
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist
>
More information about the Cmdist
mailing list