Le 31/10/2025 à 12:37, Tobias Burnus a écrit :
Hi Mikael, hi all,

Mikael Morin:
This starts a series of patches (funded by STF) to refactor initialisation
and updates of array descriptors.

First: Good to see progress in that area – and great
that the Sovereign Tech Fund fund this kind of work!

And, of course, thanks for working on this!

If I see this patch topic plus
"simplify and improve scalarization" on the to-do list:

If you touch algorithms, as surely required for the last
last item,
Actually, I ate all my budget on the descriptor thing, and scalarization simplification was simply dropped.

can you (or whoever does it) try to ensure that

arrays are possibly passed as type 'array(size1,size2)'
and 'array[i][j]' to the middle end? It has a harder time
to optimize 'array + size1*i + j' compared to already see
where the memory is adjacent.

I have that present in the back of my mind, but it is mostly orthogonal to descriptors (and to the scalarization simplifcation as well).

Descriptor arrays can be non-contiguous, so delinearized arrays don't work in that case at least. I have tried using a different array descriptor for contiguous arrays (for allocatable arrays at least), but I don't think it's worth the extra complexity. I think delinearized arrays should apply to explicit shape and assumed size (so descriptorless) arrays only.

(...)


I have currently no idea how this relates to the scalarizer
changes in practice, but I want to mention it – just in case;
maybe some implementation decision will become differently
knowing about this.

Well, the envisioned work on scalarization focused on the internal API, the one used within the fortran frontend, with the aim to simplify it with no impact (or very limited) to the generated code. But as I said, it was dropped.

Reply via email to