You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm guessing there may be a reason linked deeply into the algorithm to use single-precision floats, instead of doubles, which are often the default in many applications and libraries today.
Would it be possible to template the algorithm's fundamental storage type in order to be able to use single- or double-precision floating-point numbers (or perhaps, even some more exotic types should there be a reason for these)?
Thanks
The text was updated successfully, but these errors were encountered:
Using single-precision floats instead of doubles has one major (and obvious) advantage: memory efficiency. Using singles reduces the number of cachemisses in the L caches, reduces memory usage and allows fftw to make better optimization plans. The only downside is the loss of precision. However, in my experience, the effect of this is negligible for the majority of real-world applications.
I would be possible to make a templated version for fCWT, but why would you want this? I think it is less work to make a wrapper in said environments. I'm not sure, but my guess is that converting your signal from doubles to singles is much faster than doing the entire calculation in doubles.
Afraid as it was a year ago, so as of now I can't remember at all. I can see if I can check my code back again, although these days I'm using neural nets instead to get lower latency. Just allowing the compiler to cast is trivial so whether it was precision or some sort of ABI compatibility, I must have had a reason I was hitting to open the ticket. Although I also think templating is nice in general, then the user-programmer can choose, and it can open up the route for more optimisation.
I'm guessing there may be a reason linked deeply into the algorithm to use single-precision floats, instead of doubles, which are often the default in many applications and libraries today.
Would it be possible to template the algorithm's fundamental storage type in order to be able to use single- or double-precision floating-point numbers (or perhaps, even some more exotic types should there be a reason for these)?
Thanks
The text was updated successfully, but these errors were encountered: