diff --git a/mapmap/header/instance_factory.h b/mapmap/header/instance_factory.h index 7a22101..4515382 100755 --- a/mapmap/header/instance_factory.h +++ b/mapmap/header/instance_factory.h @@ -14,18 +14,12 @@ #include #include +#include #include NS_MAPMAP_BEGIN -/* 0s mark the default algorithm */ -enum TREE_SAMPLER_ALGORITHM -{ - OPTIMISTIC_TREE_SAMPLER = 0, - LOCK_FREE_TREE_SAMPLER = 1 -}; - /* ************************************************************************** */ template diff --git a/mapmap/header/mapmap.h b/mapmap/header/mapmap.h index dad26f2..ac0a029 100644 --- a/mapmap/header/mapmap.h +++ b/mapmap/header/mapmap.h @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -51,9 +52,6 @@ const char * const UNIX_COLOR_YELLOW = "\033[1;33m"; const char * const UNIX_COLOR_WHITE = "\033[1;37m"; const char * const UNIX_COLOR_RESET = "\033[0m"; -/* forward declarations */ -struct mapMAP_control; - /* MAPMAP main class */ template class mapMAP @@ -185,36 +183,6 @@ class mapMAP m_callback; }; -/** - * control flow struct (default values for flowgraph in paper) - * - * NOTE: despite settings concerning minimum iteration numbers, early - * termination may be forced by a user-defined termination criterion - */ -struct mapMAP_control -{ - /* switch modes on/off */ - bool use_multilevel; - bool use_spanning_tree; - bool use_acyclic; - - /* multilevel settings */ - /* none */ - - /* spanning tree settings */ - uint_t spanning_tree_multilevel_after_n_iterations; - - /* acyclic settings */ - bool force_acyclic; /* force using acyclic even if terminated */ - uint_t min_acyclic_iterations; - bool relax_acyclic_maximal; - - /* settings for tree sampling */ - TREE_SAMPLER_ALGORITHM tree_algorithm; - bool sample_deterministic; - uint_t initial_seed; -}; - NS_MAPMAP_END #include diff --git a/mapmap/header/settings.h b/mapmap/header/settings.h new file mode 100644 index 0000000..bcd648a --- /dev/null +++ b/mapmap/header/settings.h @@ -0,0 +1,57 @@ +/** + * Copyright (C) 2016, Daniel Thuerck + * TU Darmstadt - Graphics, Capture and Massively Parallel Computing + * All rights reserved. + * + * This software may be modified and distributed under the terms + * of the BSD license. See the LICENSE file for details. + */ + +#ifndef __MAPMAP_MAPMAP_SETTINGS_H_ +#define __MAPMAP_MAPMAP_SETTINGS_H_ + +#include +#include + +NS_MAPMAP_BEGIN + +/* 0s mark the default algorithm */ +enum TREE_SAMPLER_ALGORITHM +{ + OPTIMISTIC_TREE_SAMPLER = 0, + LOCK_FREE_TREE_SAMPLER = 1 +}; + +/** + * control flow struct (default values for flowgraph in paper) + * + * NOTE: despite settings concerning minimum iteration numbers, early + * termination may be forced by a user-defined termination criterion + */ +struct mapMAP_control +{ + /* switch modes on/off */ + bool use_multilevel; + bool use_spanning_tree; + bool use_acyclic; + + /* multilevel settings */ + /* none */ + + /* spanning tree settings */ + uint_t spanning_tree_multilevel_after_n_iterations; + + /* acyclic settings */ + bool force_acyclic; /* force using acyclic even if terminated */ + uint_t min_acyclic_iterations; + bool relax_acyclic_maximal; + + /* settings for tree sampling */ + TREE_SAMPLER_ALGORITHM tree_algorithm; + bool sample_deterministic; + uint_t initial_seed; +}; + +NS_MAPMAP_END + +#endif /* __MAPMAP_MAPMAP_SETTINGS_H_ */