manifold icon indicating copy to clipboard operation
manifold copied to clipboard

allow double precision

Open pca006132 opened this issue 1 year ago • 14 comments

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.

pca006132 avatar Aug 28 '23 19:08 pca006132