OrderN / CONQUEST-release

Full public release of large scale and linear scaling DFT code CONQUEST
http://www.order-n.org/
MIT License
96 stars 25 forks source link

Remove pointers in multiply module #294

Open tkoskela opened 5 months ago

tkoskela commented 5 months ago

This PR removes pointers to part_array in multiply_module and passes slices of part_array to subroutines instead. It also tries to clarify the indexing of part_array to make it clearer which slice is being passed.

I'm open to opinions on whether or not this is a good idea. It's more of a style change than anything else, although it should make the code more robust against the kind of memory errors in #280. I would argue this is a more Fortran style use of arrays, compared to the C-style use of pointers. It does make the subroutine calls somewhat longer

ilectra commented 5 months ago

Actually, can this PR please wait until we merge #290 @tkoskela ? The conflicts will be a much bigger pain if we do it the other way round....

davidbowler commented 5 months ago

I want to think about this change some more, and discuss it with @tsuyoshi38 before we approve it