<div dir="ltr"><div style>Also, could there be a way (maybe in a future clang release) for me to get static type checking for my own types, such as __float128 or pair types like {long,long} (which are not in the MPI standard)? It can't truly be a static value because I have to create the type at run-time, but perhaps there could be a way to tell clang "I promise to set this type up like so."</div>
<div><br></div>On Wed, Jan 2, 2013 at 11:31 AM, Dave Goodell <span dir="ltr"><<a href="mailto:goodell@mcs.anl.gov" target="_blank">goodell@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">[adding Hal Finkel and Dmitri Gribenko, who did most of the annotations work]<br>
<br>
Hal/Dmitri,<br>
<br>
Do you have any ideas about how to handle Jed's case?  Will the MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE macro (reproduced below) help in this case?<br>
<br>
----8<----<br>
#    define MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(type)             __attribute__((type_tag_for_datatype(MPI,type,layout_compatible)))<br>
----8<----<br>
<br>
-Dave<br>
<div><div class="h5"><br>
On Dec 30, 2012, at 11:13 PM CST, Jed Brown wrote:<br>
<br>
> I upgraded to clang-3.2 and the new type annotations are great. I'd like to have a identified for enum types, e.g.<br>
><br>
> typedef enum {SOME, VALUES} MyEnum;<br>
> #define MY_MPI_ENUM MPI_INT // or define some other way<br>
> static const MPI_Datatype my_mpi_enum MPICH_ATTR_TYPE_TAG(MyEnum) = MY_MPI_ENUM;<br>
><br>
><br>
> Of course the above does not work because the new definition masks the old one, so all the normal 'int' uses are hidden. Unfortunately, the annotation syntax requires compile-time constants, which are not accessible to me.<br>

><br>
> Is there any hope for something like this, or do I have to choose between (a) ugly cast at all MPI call points and (b) make MY_MPI_ENUM a variable so that the compiler can't check it statically?<br>
</div></div>> _______________________________________________<br>
> discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> To manage subscription options or unsubscribe:<br>
> <a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
<br>
_______________________________________________<br>
discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
</blockquote></div><br></div></div>