1 /* Handle Fortan - C conversion for MPI Types*/
3 /* Copyright (c) 2010, 2013-2015. The SimGrid Team.
4 * All rights reserved. */
6 /* This program is free software; you can redistribute it and/or modify it
7 * under the terms of the license (GNU LGPL) which comes with this package. */
9 #ifndef SMPI_F2C_HPP_INCLUDED
10 #define SMPI_F2C_HPP_INCLUDED
15 #define KEY_SIZE (sizeof(int) * 2 + 1)
22 // We use a single lookup table for every type.
23 // Beware of collisions if id in mpif.h is not unique
24 static xbt_dict_t f2c_lookup_;
27 static char* get_key(char* key, int id);
28 static char* get_key_id(char* key, int id);
29 static void delete_lookup();
30 static xbt_dict_t lookup();
32 //Override these to handle specific values.
34 static void free_f(int id);
37 //This method should be overriden in all subclasses
38 //to avoid casting the result when calling it.
39 //For the default one, the MPI_*_NULL returned is assumed to be NULL.