[Mpi-forum] C++ types inaccessible after #281

Jed Brown jedbrown at mcs.anl.gov
Mon Jun 25 22:42:53 CDT 2012

I see that std::complex will not be accessible in a predefined type if #281
passes in its current form. Do you intend for there to be a
supported/recommended way for a C++ caller to get a complex predefined (so
that one-sided can be used) type?

Note that C99 is not a subset of any C++ and C99 complex cannot be used
portably from C++ (even with compiler suites that happen to support both).
On Jun 25, 2012 7:07 PM, "Fab Tillier" <ftillier at microsoft.com> wrote:

> Hi Jed,
> Jed Brown wrote on Mon, 25 Jun 2012 at 16:43:54
> > Is it intended that #281 would make std::complex inaccessible? Should
> I don't think ticket #281 does anything with respect to std::complex
> accessibility.  The MPI standard defines the MPI_C_COMPLEX and family as
> mapping to the C99 _Complex type (see Table 3.2, Predefined MPI datatypes
> corresponding to C datatypes).  The standard is clear that there are no
> corresponding C++ bindings.
> > Note that C99 complex is not a substitute because Microsoft does not
> > implement it and it has different semantics regarding numerical
> > stability. (Well, C99 semantics are specified and useful, std::complex
> > stability is not specified by any C++ standard and in practice, is not
> > implemented in a stable way.) This is not such a big deal for use with
> > collectives because user-defined MPI_Ops can be used, but only
> > predefined types can be used with one-sided operations, so presence of
> > complex datatypes (or lack thereof) is relevant to applications.
> The fact that Microsoft does not support C99 is lame.  You can probably
> get away using std::complex as a stand-in for C99 _Complex (but then you're
> on your own), or move to a compiler that does (I believe the Intel compiler
> supports C99 on Windows).
> -Fab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpi-forum/attachments/20120625/fd9197f4/attachment-0001.html>

More information about the mpi-forum mailing list