LIHPC-Computational-Geometry / metis-rs

Idiomatic wrapper for METIS, the serial graph partitioner and fill-reducing matrix orderer
https://lihpc-computational-geometry.github.io/metis-rs/metis/
Apache License 2.0
10 stars 8 forks source link

Constify API #8

Closed hhirtz closed 1 year ago

hhirtz commented 1 year ago

redefine METIS functions with const pointers so that there is no need for mut on Rust side.

hhirtz commented 1 year ago

METIS actually does mutate input arrays in some cases, notably when numbering is set to fortran's (via metis::option::Numbering):

https://github.com/KarypisLab/METIS/blob/e0f1b88b8efcb24ffa0ec55eabb78fbe61e58ae7/libmetis/pmetis.c#L116-L120 https://github.com/KarypisLab/METIS/blob/e0f1b88b8efcb24ffa0ec55eabb78fbe61e58ae7/libmetis/fortran.c#L16-L28