Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sbalzarini Lab
S
Software
P
Parallel Computing
OpenFPM
openfpm_vcluster
Commits
a874640c
Commit
a874640c
authored
Jul 15, 2016
by
Pietro Incardona
Browse files
Fixing Finalize
parent
11b7dc34
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/VCluster.cpp
View file @
a874640c
...
...
@@ -4,3 +4,4 @@ Vcluster * global_v_cluster_private = NULL;
// number of vcluster instances
size_t
n_vcluster
=
0
;
bool
ofp_initialized
=
false
;
src/VCluster.hpp
View file @
a874640c
...
...
@@ -37,6 +37,8 @@
extern
size_t
n_vcluster
;
// Global MPI initialization
extern
bool
global_mpi_init
;
// initialization flag
extern
bool
ofp_initialized
;
///////////////////// Post functions /////////////
...
...
@@ -1004,6 +1006,16 @@ static inline Vcluster & create_vcluster()
return
*
global_v_cluster_private
;
}
/*! \brief Check if the library has been initialized
*
* \return true if the library has been initialized
*
*/
static
inline
bool
is_openfpm_init
()
{
return
ofp_initialized
;
}
/*! \brief Initialize the library
*
* This function MUST be called before any other function
...
...
@@ -1018,6 +1030,7 @@ static inline void openfpm_init(int *argc, char ***argv)
#endif
init_global_v_cluster_private
(
argc
,
argv
);
ofp_initialized
=
true
;
}
/*! \brief Finalize the library
...
...
@@ -1034,6 +1047,7 @@ static inline void openfpm_finalize()
#endif
delete_global_v_cluster_private
();
ofp_initialized
=
false
;
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment