[cfe-commits] [PATCH] Compile-time MPI_Datatype checking, type arguments in attributes
chandlerc at google.com
Sun Feb 12 19:15:03 CST 2012
On Sat, Feb 11, 2012 at 10:09 AM, Dmitri Gribenko <gribozavr at gmail.com>wrote:
> === Objective ===
> Implement a set of annotations for MPI libraries and a diagnostic for
> clang that checks that specified buffer type matches the passed
> === 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:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits