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
2 changes: 1 addition & 1 deletion mapmap/header/costs.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class ModeNotSupportedException : public std::exception
ModeNotSupportedException(const std::string& err_msg);
~ModeNotSupportedException();

const char* what() const throw();
const char* what() const noexcept;

protected:
std::string m_err_msg;
Expand Down
2 changes: 1 addition & 1 deletion mapmap/header/dynamic_programming.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class CombinatorialDynamicProgramming :
~CombinatorialDynamicProgramming();

_s_t<COSTTYPE, SIMDWIDTH> optimize(
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& solution) throw();
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& solution);

protected:
void discover_leaves();
Expand Down
2 changes: 1 addition & 1 deletion mapmap/header/graph.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Graph
~Graph();

void add_edge(const luint_t node_a, const luint_t node_b,
const scalar_t<COSTTYPE> weight) throw();
const scalar_t<COSTTYPE> weight);
const std::vector<GraphNode>& nodes() const;
const luint_t num_nodes() const;
const std::vector<luint_t>& inc_edges(const luint_t node) const;
Expand Down
13 changes: 6 additions & 7 deletions mapmap/header/mapmap.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,14 @@ class mapMAP
~mapMAP();

/* set graph and label set */
void set_graph(Graph<COSTTYPE> * graph) throw();
void set_label_set(const LabelSet<COSTTYPE, SIMDWIDTH> * label_set)
throw();
void set_graph(Graph<COSTTYPE> * graph);
void set_label_set(const LabelSet<COSTTYPE, SIMDWIDTH> * label_set);

/* alternatively - construct graph and label set */
void add_edge(const luint_t node_a, const luint_t node_b,
const _s_t<COSTTYPE, SIMDWIDTH> weight = 1.0) throw();
const _s_t<COSTTYPE, SIMDWIDTH> weight = 1.0);
void set_node_label_set(const luint_t node_id, const
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& label_set) throw();
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& label_set);

/* set MRF cost functions (compatibility mode) */
void set_unaries(const UnaryCosts<COSTTYPE, SIMDWIDTH> * unaries);
Expand All @@ -100,11 +99,11 @@ class mapMAP

/* start optimization */
_s_t<COSTTYPE, SIMDWIDTH> optimize(std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>&
solution) throw();
solution);

/* start optimization with customized control flow */
_s_t<COSTTYPE, SIMDWIDTH> optimize(std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>&
solution, const mapMAP_control& control_flow) throw();
solution, const mapMAP_control& control_flow);

protected:
/* setup, sanity checks and tools */
Expand Down
2 changes: 1 addition & 1 deletion mapmap/header/optimizer_instances/dynamic_programming.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class CombinatorialDynamicProgramming :
~CombinatorialDynamicProgramming();

_s_t<COSTTYPE, SIMDWIDTH> optimize(
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& solution) throw();
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& solution);

protected:
void discover_leaves();
Expand Down
2 changes: 1 addition & 1 deletion mapmap/header/tree_optimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TreeOptimizer

/* optimization procedure - returns new objective value and solution */
virtual _s_t<COSTTYPE, SIMDWIDTH> optimize(
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& solution) throw() = 0;
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& solution) = 0;

protected:
bool data_complete();
Expand Down
2 changes: 1 addition & 1 deletion mapmap/source/costs.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ FORCEINLINE
const char*
ModeNotSupportedException::
what()
const throw()
const noexcept
{
return m_err_msg.c_str();
}
Expand Down
1 change: 0 additions & 1 deletion mapmap/source/dynamic_programming.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ _s_t<COSTTYPE, SIMDWIDTH>
CombinatorialDynamicProgramming<COSTTYPE, SIMDWIDTH, UNARY, PAIRWISE>::
optimize(
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& solution)
throw()
{
if(!this->data_complete())
throw std::domain_error("Data for optimization problem "
Expand Down
1 change: 0 additions & 1 deletion mapmap/source/graph.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ add_edge(
const luint_t node_a,
const luint_t node_b,
const COSTTYPE weight)
throw()
{
if(std::max(node_a, node_b) >= m_num_nodes)
throw std::runtime_error("Graph::add_edge: "
Expand Down
6 changes: 0 additions & 6 deletions mapmap/source/mapmap.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ void
mapMAP<COSTTYPE, SIMDWIDTH>::
set_graph(
Graph<COSTTYPE> * graph)
throw()
{
if(m_construct_graph)
throw std::runtime_error("Setting the graph is not allowed "
Expand All @@ -111,7 +110,6 @@ void
mapMAP<COSTTYPE, SIMDWIDTH>::
set_label_set(
const LabelSet<COSTTYPE, SIMDWIDTH> * label_set)
throw()
{
if(m_construct_graph)
throw std::runtime_error("Setting the label set is not allowed "
Expand All @@ -131,7 +129,6 @@ add_edge(
const luint_t node_a,
const luint_t node_b,
const _s_t<COSTTYPE, SIMDWIDTH> weight)
throw()
{
if(!m_construct_graph)
throw std::runtime_error("Adding edges is only allowed "
Expand All @@ -149,7 +146,6 @@ mapMAP<COSTTYPE, SIMDWIDTH>::
set_node_label_set(
const luint_t node_id,
const std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& label_set)
throw()
{
if(!m_construct_graph)
throw std::runtime_error("Setting a label set is only allowed "
Expand Down Expand Up @@ -278,7 +274,6 @@ _s_t<COSTTYPE, SIMDWIDTH>
mapMAP<COSTTYPE, SIMDWIDTH>::
optimize(
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& solution)
throw()
{
/* initialize control flow with standard values */
mapMAP_control std_control;
Expand All @@ -305,7 +300,6 @@ mapMAP<COSTTYPE, SIMDWIDTH>::
optimize(
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& solution,
const mapMAP_control& control_flow)
throw()
{
_s_t<COSTTYPE, SIMDWIDTH> obj;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ _s_t<COSTTYPE, SIMDWIDTH>
CombinatorialDynamicProgramming<COSTTYPE, SIMDWIDTH>::
optimize(
std::vector<_iv_st<COSTTYPE, SIMDWIDTH>>& solution)
throw()
{
if(!this->data_complete())
throw std::domain_error("Data for optimization problem "
Expand Down