Open jlbyrne-hpe opened 2 years ago
We have a few different ways of doing this internally—one of which was the cause of #19087—and should really come up with a user-facing API and then replace all the current ways of doing it with that instead. Tagging @stonea and @vasslitvinov since this relates somewhat to the reviews of the domain and array modules we've been doing recently (it's not Chapel 2.0 in that it wouldn't be breaking to add later, but may be good / easy to knock out while we're discussing these things).
Working around #19087, I struggled to add an where-clause that could specialize the handling of non-distributed arrays. I ended up testing for DefaultDist, which seems to work, but it isn't intuitive and it isn't at all clear whether there are holes. More broadly, I think it might be useful for optimization.
@bradcray mentioned in an email that there is an internal interface --- "proc chpl__isDROrDRView() param : bool { ... }" --- but that a user-facing routine would be reasonable.