Last active
November 12, 2018 22:48
-
-
Save DavidPoliakoff/24fa407e38221a44a35c122162b3ee3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct gotcha_binding_t mpi_wrappers[] = { | |
{ "MPI_Init", mpi_init_wrapper, &orig_mpi_init_handle }, | |
// other wrappers as desired | |
}; | |
static int mpi_init_wrapper(int* argc, char*** argv ) | |
{ | |
typeof(&puts) orig_init = gotcha_get_wrappee(orig_mpi_init_handle); | |
/** do tool_things */ | |
return orig_init(str); | |
} | |
void init_tool() | |
{ | |
if(you_want_to){ | |
result = gotcha_wrap(mpi_wrappers, | |
number_of_wrappers, | |
"myToolName"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment