[Mpi-22] Ticket #46: Add const Keyword to the Cbindings-implementation
Jeff Squyres
jsquyres at [hidden]
Wed Mar 18 20:24:24 CDT 2009
Can someone explain what the rush is to do this for 2.2?
Is there a problem with putting this issue off until 3.0?
On Mar 18, 2009, at 9:15 PM, Darius Buntinas wrote:
>
> I just want to point out that casting away the const for low-level
> interfaces is really a non issue. Putting a const on the send buffer
> parameter in an MPI function prototype indicates a contract with the
> user that the MPI implementation will not change the contents of the
> buffer referenced from that function. As long as the MPI implementor
> knows that a routine called by the library will not modify the buffer
> it's OK to cast away the const. E.g., the POSIX standard tells you
> that
> writev must not change the contents of the buffer, so casting away
> const
> is fine.
>
> Sure, that means that the MPI implementor has to be more careful when
> casting away const to ensure that the function being called won't
> modify
> the buffer. But the whole point of the proposal is so that the
> _MPI_user_ doesn't need to do this and instead can count on the
> compiler
> to do the check.
>
> -d
> _______________________________________________
> mpi-22 mailing list
> mpi-22_at_[hidden]
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22
--
Jeff Squyres
Cisco Systems
More information about the Mpi-22
mailing list