Array Descriptor Update
Paul Richard Thomas
paul.richard.thomas@gmail.com
Fri Sep 26 08:25:00 GMT 2008
Dear All,
Janne and Thomas have been contributing to a rather important page on
the gfortran wiki: http://gcc.gnu.org/wiki/ArrayDescriptorUpdate
It starts with, "In some cases it would be nice to improve gfortran's
array descriptors."
I think that it has become essential to do this as one of the first
tasks in gcc-4.5, for the reasons given in the wiki page and to
realise such things as allocatable scalars and, I have come to
believe, CLASSES. The reason it might be a good thing for classes is
because of the need to carry a type identifier with the class pointer.
This could be done in the same way as character lengths, as at
present, or as a descriptor field. I do wonder if this is not the
purpose of the reserved word in the Intel descriptor?
One thing that is noticable about the Intel and the Pathscale
descriptors is that they carry no type or kind information, whereas
gfortran packs this into the DTYPE word. I started looking to see if
gfortran uses this descriptor information anywhere and so far have
drawn a blank; admittedly on a not very thorough search. In addition,
I have not seen any use of the size information either. Does anybody
know if it is used anywhere?
It crosses my mind that in order to preserve backward compatibility of
the API, we could put extra information after the dimension fields and
leave the latter alone. This would have the disadvantage that the
reform (stride, lbound, ubound) => (lbound, stride, extent) and
handling bytes rather than words would be put off. How important is
backward compatibility?
Opinions and thoughts please!
Cheers
Paul
More information about the Fortran
mailing list