Commit 41abeaa2 authored by William Gropp's avatar William Gropp
Browse files

[svn-r5355] Added (or moved) MPIU_THREADPRIV_DECL so that the thread-private...

[svn-r5355] Added (or moved) MPIU_THREADPRIV_DECL so that the thread-private area is acquired only once within a routine, since the data (pointer to the thread-private area) is fixed during the execution.  This reduces the overhead of the nest increment/decrement, for example
parent aa61523b
......@@ -59,6 +59,7 @@ int MPI_Info_get(MPI_Info info, char *key, int valuelen, char *value,
#endif
MPID_Info *curr_ptr, *info_ptr=0;
int mpi_errno = MPI_SUCCESS;
MPIU_THREADPRIV_DECL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_INFO_GET);
MPIR_ERRTEST_INITIALIZED_ORDIE();
......
......@@ -52,6 +52,7 @@ int MPI_Info_get_nkeys( MPI_Info info, int *nkeys )
MPID_Info *info_ptr=0;
int n;
int mpi_errno = MPI_SUCCESS;
MPIU_THREADPRIV_DECL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_INFO_GET_NKEYS);
MPIR_ERRTEST_INITIALIZED_ORDIE();
......
......@@ -52,6 +52,7 @@ int MPI_Info_get_nthkey( MPI_Info info, int n, char *key )
int nkeys;
static const char FCNAME[] = "MPI_Info_get_nthkey";
int mpi_errno = MPI_SUCCESS;
MPIU_THREADPRIV_DECL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_INFO_GET_NTHKEY);
MPIR_ERRTEST_INITIALIZED_ORDIE();
......
......@@ -55,6 +55,7 @@ int MPI_Info_get_valuelen( MPI_Info info, char *key, int *valuelen, int *flag )
static const char FCNAME[] = "MPI_Info_get_valuelen";
#endif
int mpi_errno = MPI_SUCCESS;
MPIU_THREADPRIV_DECL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_INFO_GET_VALUELEN);
MPIR_ERRTEST_INITIALIZED_ORDIE();
......
......@@ -52,6 +52,7 @@ int MPI_Info_set( MPI_Info info, char *key, char *value )
static const char FCNAME[] = "MPI_Info_set";
int mpi_errno = MPI_SUCCESS;
MPID_Info *info_ptr=0, *curr_ptr, *prev_ptr;
MPIU_THREADPRIV_DECL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_INFO_SET);
MPIR_ERRTEST_INITIALIZED_ORDIE();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment