Skip to content

Commit 25ed696

Browse files
authored
Merge pull request #43 from magicplan/ldz/MP-14336-mvs-texturing-options
Expose settings into a header that doesn't include impl file.
2 parents fa526e0 + 7570d99 commit 25ed696

File tree

3 files changed

+59
-40
lines changed

3 files changed

+59
-40
lines changed

mapmap/header/instance_factory.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,12 @@
1414
#include <mapmap/header/graph.h>
1515

1616
#include <mapmap/header/tree_sampler.h>
17+
#include <mapmap/header/settings.h>
1718

1819
#include <memory>
1920

2021
NS_MAPMAP_BEGIN
2122

22-
/* 0s mark the default algorithm */
23-
enum TREE_SAMPLER_ALGORITHM
24-
{
25-
OPTIMISTIC_TREE_SAMPLER = 0,
26-
LOCK_FREE_TREE_SAMPLER = 1
27-
};
28-
2923
/* ************************************************************************** */
3024

3125
template<typename COSTTYPE, bool ACYCLIC>

mapmap/header/mapmap.h

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <mapmap/header/tree.h>
2828
#include <mapmap/header/tree_optimizer.h>
2929
#include <mapmap/header/instance_factory.h>
30+
#include <mapmap/header/settings.h>
3031

3132
#include <oneapi/tbb/tick_count.h>
3233

@@ -51,9 +52,6 @@ const char * const UNIX_COLOR_YELLOW = "\033[1;33m";
5152
const char * const UNIX_COLOR_WHITE = "\033[1;37m";
5253
const char * const UNIX_COLOR_RESET = "\033[0m";
5354

54-
/* forward declarations */
55-
struct mapMAP_control;
56-
5755
/* MAPMAP main class */
5856
template<typename COSTTYPE, uint_t SIMDWIDTH>
5957
class mapMAP
@@ -185,36 +183,6 @@ class mapMAP
185183
m_callback;
186184
};
187185

188-
/**
189-
* control flow struct (default values for flowgraph in paper)
190-
*
191-
* NOTE: despite settings concerning minimum iteration numbers, early
192-
* termination may be forced by a user-defined termination criterion
193-
*/
194-
struct mapMAP_control
195-
{
196-
/* switch modes on/off */
197-
bool use_multilevel;
198-
bool use_spanning_tree;
199-
bool use_acyclic;
200-
201-
/* multilevel settings */
202-
/* none */
203-
204-
/* spanning tree settings */
205-
uint_t spanning_tree_multilevel_after_n_iterations;
206-
207-
/* acyclic settings */
208-
bool force_acyclic; /* force using acyclic even if terminated */
209-
uint_t min_acyclic_iterations;
210-
bool relax_acyclic_maximal;
211-
212-
/* settings for tree sampling */
213-
TREE_SAMPLER_ALGORITHM tree_algorithm;
214-
bool sample_deterministic;
215-
uint_t initial_seed;
216-
};
217-
218186
NS_MAPMAP_END
219187

220188
#include <mapmap/source/mapmap.impl.h>

mapmap/header/settings.h

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/**
2+
* Copyright (C) 2016, Daniel Thuerck
3+
* TU Darmstadt - Graphics, Capture and Massively Parallel Computing
4+
* All rights reserved.
5+
*
6+
* This software may be modified and distributed under the terms
7+
* of the BSD license. See the LICENSE file for details.
8+
*/
9+
10+
#ifndef __MAPMAP_MAPMAP_SETTINGS_H_
11+
#define __MAPMAP_MAPMAP_SETTINGS_H_
12+
13+
#include <mapmap/header/defines.h>
14+
#include <mapmap/header/vector_types.h>
15+
16+
NS_MAPMAP_BEGIN
17+
18+
/* 0s mark the default algorithm */
19+
enum TREE_SAMPLER_ALGORITHM
20+
{
21+
OPTIMISTIC_TREE_SAMPLER = 0,
22+
LOCK_FREE_TREE_SAMPLER = 1
23+
};
24+
25+
/**
26+
* control flow struct (default values for flowgraph in paper)
27+
*
28+
* NOTE: despite settings concerning minimum iteration numbers, early
29+
* termination may be forced by a user-defined termination criterion
30+
*/
31+
struct mapMAP_control
32+
{
33+
/* switch modes on/off */
34+
bool use_multilevel;
35+
bool use_spanning_tree;
36+
bool use_acyclic;
37+
38+
/* multilevel settings */
39+
/* none */
40+
41+
/* spanning tree settings */
42+
uint_t spanning_tree_multilevel_after_n_iterations;
43+
44+
/* acyclic settings */
45+
bool force_acyclic; /* force using acyclic even if terminated */
46+
uint_t min_acyclic_iterations;
47+
bool relax_acyclic_maximal;
48+
49+
/* settings for tree sampling */
50+
TREE_SAMPLER_ALGORITHM tree_algorithm;
51+
bool sample_deterministic;
52+
uint_t initial_seed;
53+
};
54+
55+
NS_MAPMAP_END
56+
57+
#endif /* __MAPMAP_MAPMAP_SETTINGS_H_ */

0 commit comments

Comments
 (0)