3 ms·
Agreed, realistically you're going to either convert the data or give up on using the function rather than reimplementing it to support another data layout effi
by yosefk 2y ago
Agreed, realistically you're going to either convert the data or give up on using the function rather than reimplementing it to support another data layout efficiently; while converting the code instead of the data, so to speak, is more efficient from the machine resource use POV, it can be very rough on human resources.
(The article is basically about not having to give up in some cases where you can tweak the input parameters and make things work without rewriting the function; but it's not always possible)
- semi-extrinsic 2y agoTalking about rough on human resources, I take it you've never written iterative Krylov methods where matrices are in compressed sparse row (CSR) format? Because that's the kind of mental model capacity scientific programmers needed to have back in the days. People still do similarly brain-twisting things today. In this context, converting your logic between C and Fortran to avoid shuffling data is trivial.