manifold
manifold copied to clipboard
allow double precision
While it is not our main usecase, it might be desirable to be able to handle large meshes which requires using 64 bit indices. Note that the mesh itself may not be that large, but there can be many collisions that makes intermediate operation exceed the 32 bit integer range.
Apart from refactoring, we may hit https://github.com/NVIDIA/cccl/issues/744. Doing NVIDIA/thrust#541 first may help.
Also, using larger integer indices will probably come with a performance cost due to the additional memory transfers. I wonder if we should dynamically dispatch the operations to select the best size, int16/32/64 depending on the data size. This will make the code a bit more complicated (additional logic for dispatch, maybe we can make it something like the existing par.h API), but may be worth it.