JuliaGeometry / GeometricalPredicates.jl

Fast and robust 2D & 3D incircle/intriangle/etc. for Julia
Other
57 stars 14 forks source link

Support x86? #43

Closed fjebaker closed 2 years ago

fjebaker commented 2 years ago

Hello! One of the CI runs for a project I'm working on uses Julia built for x86, where the default integer type is Int32. It failed to precompile GeometricalPredicates with the following error:

ERROR: LoadError: MethodError: no method matching quadrants(::Int32, ::Int32, ::Int32, ::Int32)
Stacktrace:
 [1] _init_inv_peano_3d()
   @ GeometricalPredicates ~/.julia/packages/GeometricalPredicates/1dBKW/src/GeometricalPredicates.jl:998

Why this happens is pretty clear in the source:

https://github.com/JuliaGeometry/GeometricalPredicates.jl/blob/045d35599a06c45c603b67fabcb970113c342108/src/GeometricalPredicates.jl#L993-L1006

and could be fixed by just adding type annotations for rotation::Int64, bitx::Int64, etc..

I don't know if x86 is something you want to support? But if not, could you maybe add a line about that in the readme, or get the precompile to fail with a more meaningful message?

I'm also happy to contribute a PR if that would be helpful.

Thanks!

blegat commented 2 years ago

I'm running into the same issue in https://github.com/JuliaPolyhedra/HyperVoronoiDelaunay.jl/runs/6857034700?check_suite_focus=true