Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions mapmap/header/instance_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,12 @@
#include <mapmap/header/graph.h>

#include <mapmap/header/tree_sampler.h>
#include <mapmap/header/settings.h>

#include <memory>

NS_MAPMAP_BEGIN

/* 0s mark the default algorithm */
enum TREE_SAMPLER_ALGORITHM
{
OPTIMISTIC_TREE_SAMPLER = 0,
LOCK_FREE_TREE_SAMPLER = 1
};

/* ************************************************************************** */

template<typename COSTTYPE, bool ACYCLIC>
Expand Down
34 changes: 1 addition & 33 deletions mapmap/header/mapmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <mapmap/header/tree.h>
#include <mapmap/header/tree_optimizer.h>
#include <mapmap/header/instance_factory.h>
#include <mapmap/header/settings.h>

#include <oneapi/tbb/tick_count.h>

Expand All @@ -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<typename COSTTYPE, uint_t SIMDWIDTH>
class mapMAP
Expand Down Expand Up @@ -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 <mapmap/source/mapmap.impl.h>
Expand Down
57 changes: 57 additions & 0 deletions mapmap/header/settings.h
Original file line number Diff line number Diff line change
@@ -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 <mapmap/header/defines.h>
#include <mapmap/header/vector_types.h>

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_ */
Loading