00001 #ifndef AMPI_FUNCPTR_H_
00002 #define AMPI_FUNCPTR_H_
00003 
00004 #include "ampi.h"
00005 
00006 
00007 #define AMPI_CUSTOM_FUNCPTR_DEF(return_type, function_name, ...) \
00008   return_type (* function_name)(__VA_ARGS__);
00009 #if AMPI_HAVE_PMPI
00010   #define AMPI_FUNCPTR_DEF(return_type, function_name, ...) \
00011     return_type (* function_name)(__VA_ARGS__);             \
00012     return_type (* P##function_name)(__VA_ARGS__);
00013 #else
00014   #define AMPI_FUNCPTR_DEF AMPI_CUSTOM_FUNCPTR_DEF
00015 #endif
00016 
00017 
00018 struct AMPI_FuncPtr_Transport
00019 {
00020 #define AMPI_FUNC AMPI_FUNCPTR_DEF
00021 #define AMPI_FUNC_NOIMPL AMPI_FUNC
00022 #define AMPI_CUSTOM_FUNC AMPI_CUSTOM_FUNCPTR_DEF
00023 
00024 #include "ampi_functions.h"
00025 
00026 #undef AMPI_FUNC
00027 #undef AMPI_FUNC_NOIMPL
00028 #undef AMPI_CUSTOM_FUNC
00029 };
00030 
00031 
00032 #endif