VCluster.cpp 584 Bytes
Newer Older
incardon's avatar
incardon committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "VCluster.hpp"

Vcluster * global_v_cluster = NULL;

/*! \brief Initialize a global instance of Runtime Virtual Cluster Machine
 *
 * Initialize a global instance of Runtime Virtual Cluster Machine
 *
 */

void init_global_v_cluster(int *argc, char ***argv)
{
	if (global_v_cluster == NULL)
		global_v_cluster = new Vcluster(argc,argv);
}

// Deallocator object, it deallocate the global_v_cluster at the end of the program
class init_glob_v_cluster
{
public:
21

incardon's avatar
incardon committed
22
23
24
25
26
27
28
29
	~init_glob_v_cluster()
	{
		delete global_v_cluster;
	};
};

// Deallocate at the end
init_glob_v_cluster v_cls;