[vtk-developers] Fast floor/round in VTK
David Gobbi
david.gobbi at gmail.com
Fri Oct 8 17:24:53 EDT 2010
On Fri, Oct 8, 2010 at 3:03 PM, Sean McBride <sean at rogue-research.com> wrote:
>
> So it's not appreciably slower that the current special cases?
I haven't benched it vs. vtkImageResliceFloor, but I know that it
won't be quite as fast... the ResliceFloor is just an add, a
cast-to-int, and a subtract... about half as much code as this new
Floor. So as messy as they are, I'm leaving the ResliceFloor cases
as-is for now. Remember that ResliceFloor is just an approximation
(but always within 1e-6), while this new Floor() gives a perfect
result except in the case of overflow. So they aren't really
interchangeable.
David
More information about the vtk-developers
mailing list