issues
search
Deltares
/
numba_celltree
Celltree data structure for searching for points, lines, boxes, and cells (convex polygons) in a two dimensional unstructured mesh.
https://deltares.github.io/numba_celltree/
MIT License
11
stars
3
forks
source link
Oxidize celltree
#3
Closed
Hofer-Julian
closed
8 months ago
Hofer-Julian
commented
1 year ago
Expected benefits:
memory safety
thread safety
helpful error messages instead of segfaults (e.g. with out-of-bound access)
Steps:
migrate one numba function that is not called by other numba functions
rely on std containers if possible (
Vec
)
benchmark
evaluate debugging experience
Hofer-Julian
commented
1 year ago
Conclusions:
everything related to the std worked smoothly and as expected
dealing with Rust + ndarray + pyO3 + python-numpy involves jumping though some hoops (repetitive, not too bad)
Rust adds verbosity to the code (random
&
,
*
, and lifetime parameters
'
decreasing readibility)
Error messages related to
ndarray
are often next to useless
We couldn't get a specific use case to work (zip two arrays of different dimensions in parallel), but it is unclear whether:
It can work, but we missed documentation
It doesn't work and rayon-ndarray integration has to be improved
Either way, we found that we spend a lot of time fighting the Rust compiler and it didn't give us a lot of useful hints.
Expected benefits:
Steps:
Vec
)