[cfe-commits] [PATCH] Compile-time MPI_Datatype checking, type arguments in attributes
Chandler Carruth
chandlerc at google.com
Sun Feb 12 17:15:03 PST 2012
On Sat, Feb 11, 2012 at 10:09 AM, Dmitri Gribenko <gribozavr at gmail.com>wrote:
> Hello,
>
> === Objective ===
> Implement a set of annotations for MPI libraries and a diagnostic for
> clang that checks that specified buffer type matches the passed
> MPI_Datatype.
>
> === Background ===
> Many MPI functions take a void* `buffer' and an MPI_Datatype (like
> MPI_INT, MPI_LONG etc) that describes how to send/receive that buffer.
> For example,
>
> int MPI_Send(void *buf, int count, MPI_Datatype datatype, int dest,
> int tag, MPI_Comm comm);
>
Before I look in much closer detail at this proposal, I'd really like to
understand why the solution to the lack of type safety in this C API isn't
to use a C++ API.
We have languages that provide strong type safety guarantees and high
efficiency. It would be a shame to design and layer a type safety system on
top of a C API like this rather than use those languages.
This isn't a hypothetical either, we have such C++ interfaces:
http://www.boost.org/doc/libs/1_48_0/doc/html/mpi.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120212/f83acfe0/attachment.html>
More information about the cfe-commits
mailing list