[Mpi-22] Ticket #46: Add const Keyword to the C bindings- implementation
William Gropp
wgropp at [hidden]
Fri Mar 13 08:40:24 CDT 2009
Two comments: First, this is a chicken-and-egg problem; the low level
interfaces are unlikely to change to add const unless there is some
application that will take advantage of that (and internally, if their
semantics allows it and their compiler can support it, they'll just
cast to add the const). So MPI should take the lead, particularly
since using const also provides information to the user. Second, MPI
also runs on systems with tighter integration with the interconnect;
not all implementations are on top of other middleware layers, so the
failure of those layers to make use of const (and restrict) isn't a
good argument for MPI to wait on them.
Finally, MPICH2 has used const (and even restrict!) internally in
places where a sophisticated compiler can take advantage of it. So
its not just syntactic sugar.
Bill
On Mar 12, 2009, at 2:04 PM, Underwood, Keith D wrote:
> It would seem like const would eventually have to be cast away for
> most lower level interfaces. Portals, Elan, IB Verbs, and as best I
> can tell MX don't have const on their send buffers...
>
> Keith
William Gropp
Deputy Director for Research
Institute for Advanced Computing Applications and Technologies
Paul and Cynthia Saylor Professor of Computer Science
University of Illinois Urbana-Champaign
More information about the Mpi-22
mailing list