Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support x86? #43

Closed
fjebaker opened this issue Jun 4, 2022 · 1 comment · Fixed by #44 or #45
Closed

Support x86? #43

fjebaker opened this issue Jun 4, 2022 · 1 comment · Fixed by #44 or #45

Comments

@fjebaker
Copy link

fjebaker commented Jun 4, 2022

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:

function _init_inv_peano_3d()
for rotation in 0:23
for bitx in 0:1
for bity in 0:1
for bitz in 0:1
quad = quadrants(rotation, bitx, bity, bitz)
quadrants_inverse_x[rotation+1, quad+1] = bitx;
quadrants_inverse_y[rotation+1, quad+1] = bity;
quadrants_inverse_z[rotation+1, quad+1] = bitz;
end
end
end
end
end

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
Copy link
Contributor

blegat commented Jul 5, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants