Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
OPAL
src
Commits
31b9141f
Commit
31b9141f
authored
Jan 24, 2020
by
gsell
Browse files
cleanup: comment out unused parameters in optimizer
parent
07185905
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
99 additions
and
19 deletions
+99
-19
optimizer/Comm/MasterGraph/SocialNetworkGraph.h
optimizer/Comm/MasterGraph/SocialNetworkGraph.h
+1
-1
optimizer/Expression/Parser/#annotation.hpp#
optimizer/Expression/Parser/#annotation.hpp#
+77
-0
optimizer/Expression/Parser/annotation.hpp
optimizer/Expression/Parser/annotation.hpp
+2
-2
optimizer/Expression/Parser/requirements.hpp
optimizer/Expression/Parser/requirements.hpp
+6
-5
optimizer/Optimizer/EA/BlendCrossover.h
optimizer/Optimizer/EA/BlendCrossover.h
+3
-2
optimizer/Optimizer/EA/Individual.h
optimizer/Optimizer/EA/Individual.h
+3
-2
optimizer/Optimizer/EA/NaiveOnePointCrossover.h
optimizer/Optimizer/EA/NaiveOnePointCrossover.h
+1
-1
optimizer/Optimizer/EA/NaiveUniformCrossover.h
optimizer/Optimizer/EA/NaiveUniformCrossover.h
+1
-1
optimizer/Optimizer/EA/OneBitMutation.h
optimizer/Optimizer/EA/OneBitMutation.h
+1
-1
optimizer/Pilot/Pilot.h
optimizer/Pilot/Pilot.h
+2
-2
optimizer/Util/Trace/Trace.h
optimizer/Util/Trace/Trace.h
+1
-1
optimizer/Util/Types.h
optimizer/Util/Types.h
+1
-1
No files found.
optimizer/Comm/MasterGraph/SocialNetworkGraph.h
View file @
31b9141f
...
...
@@ -32,7 +32,7 @@ class SocialNetworkGraph : public TopoDiscoveryStrategy_t {
public:
std
::
set
<
size_t
>
execute
(
size_t
numMasters
,
size_t
dimensions
,
size_t
id
,
int
island_id
)
{
int
/*
island_id
*/
)
{
numMasters_
=
numMasters
;
dim_
=
dimensions
;
...
...
optimizer/Expression/Parser/#annotation.hpp#
0 → 100644
View file @
31b9141f
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#if !defined(ANNOTATION_HPP)
#define ANNOTATION_HPP
#include <map>
#include <boost/variant/apply_visitor.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/mpl/bool.hpp>
#include "ast.hpp"
namespace client
{
///////////////////////////////////////////////////////////////////////////////
// The annotation handler links the AST to a map of iterator positions
// for the purpose of subsequent semantic error handling when the
// program is being compiled.
///////////////////////////////////////////////////////////////////////////////
template <typename Iterator>
struct annotation
{
#if BOOST_VERSION >= 106200
template <typename>
#else
template <typename, typename>
#endif
struct result { typedef void type; };
std::vector<Iterator>& iters;
annotation(std::vector<Iterator>& iters)
: iters(iters) {}
struct set_id
{
typedef void result_type;
int id;
set_id(int id) : id(id) {}
void operator()(ast::function_call& x) const
{
x.function_name.id = id;
}
void operator()(ast::identifier& x) const
{
x.id = id;
}
template <typename T>
void operator()(T& /*x*/) const
{
// no-op
}
};
void operator()(ast::operand& ast, Iterator pos) const
{
int id = iters.size();
iters.push_back(pos);
boost::apply_visitor(set_id(id), ast);
}
void operator()(ast::identifier& ast, Iterator pos) const
{
int id = iters.size();
iters.push_back(pos);
ast.id = id;
}
};
}
#endif
optimizer/Expression/Parser/annotation.hpp
View file @
31b9141f
...
...
@@ -52,7 +52,7 @@ namespace client
}
template
<
typename
T
>
void
operator
()(
T
&
x
)
const
void
operator
()(
T
&
/*x*/
)
const
{
// no-op
}
...
...
@@ -74,4 +74,4 @@ namespace client
};
}
#endif
\ No newline at end of file
#endif
optimizer/Expression/Parser/requirements.hpp
View file @
31b9141f
...
...
@@ -35,10 +35,10 @@ namespace client { namespace code_gen
}
bool
operator
()(
ast
::
nil
)
{
BOOST_ASSERT
(
0
);
return
false
;
}
bool
operator
()(
unsigned
int
x
)
{
return
true
;
}
bool
operator
()(
double
x
)
{
return
true
;
}
bool
operator
()(
bool
x
)
{
return
true
;
}
bool
operator
()(
ast
::
quoted_string
const
&
x
)
{
return
true
;
}
bool
operator
()(
unsigned
int
/*x*/
)
{
return
true
;
}
bool
operator
()(
double
/*x*/
)
{
return
true
;
}
bool
operator
()(
bool
/*x*/
)
{
return
true
;
}
bool
operator
()(
ast
::
quoted_string
const
&
/*x*/
)
{
return
true
;
}
bool
operator
()(
ast
::
operation
const
&
x
)
{
if
(
!
boost
::
apply_visitor
(
*
this
,
x
.
operand_
))
...
...
@@ -97,4 +97,5 @@ namespace client { namespace code_gen
};
}}
#endif
\ No newline at end of file
#endif
optimizer/Optimizer/EA/BlendCrossover.h
View file @
31b9141f
...
...
@@ -16,7 +16,7 @@
template
<
class
T
>
struct
BlendCrossover
{
void
crossover
(
boost
::
shared_ptr
<
T
>
ind1
,
boost
::
shared_ptr
<
T
>
ind2
,
CmdArguments_t
args
)
{
CmdArguments_t
/*
args
*/
)
{
// BLX-0.5 performs better than BLX operators with any other \alpha
// value
...
...
@@ -34,4 +34,5 @@ template <class T> struct BlendCrossover
ind2
->
genes_m
[
i
]
=
(
1
-
gamma2
)
*
ming
+
gamma2
*
maxg
;
}
}
};
\ No newline at end of file
};
optimizer/Optimizer/EA/Individual.h
View file @
31b9141f
...
...
@@ -77,7 +77,7 @@ public:
/// serialization of structure
template
<
class
Archive
>
void
serialize
(
Archive
&
ar
,
const
unsigned
int
version
)
{
void
serialize
(
Archive
&
ar
,
const
unsigned
int
/*
version
*/
)
{
ar
&
genes_m
;
ar
&
objectives_m
;
ar
&
id_m
;
...
...
@@ -157,4 +157,5 @@ private:
constraints_t
constraints_m
;
};
#endif
\ No newline at end of file
#endif
optimizer/Optimizer/EA/NaiveOnePointCrossover.h
View file @
31b9141f
...
...
@@ -4,7 +4,7 @@
template
<
class
T
>
struct
NaiveOnePointCrossover
{
void
crossover
(
boost
::
shared_ptr
<
T
>
ind1
,
boost
::
shared_ptr
<
T
>
ind2
,
CmdArguments_t
args
)
{
CmdArguments_t
/*
args
*/
)
{
typedef
typename
T
::
genes_t
genes_t
;
genes_t
genes_ind2
;
...
...
optimizer/Optimizer/EA/NaiveUniformCrossover.h
View file @
31b9141f
...
...
@@ -5,7 +5,7 @@
template
<
class
T
>
struct
NaiveUniformCrossover
{
void
crossover
(
boost
::
shared_ptr
<
T
>
ind1
,
boost
::
shared_ptr
<
T
>
ind2
,
CmdArguments_t
args
)
{
CmdArguments_t
/*
args
*/
)
{
Individual
::
genes_t
genes_ind2
=
ind2
->
genes_m
;
...
...
optimizer/Optimizer/EA/OneBitMutation.h
View file @
31b9141f
...
...
@@ -4,7 +4,7 @@
/// Mutate exactly one gene of an individual.
template
<
class
T
>
struct
OneBitMutation
{
void
mutate
(
boost
::
shared_ptr
<
T
>
ind
,
CmdArguments_t
args
)
{
void
mutate
(
boost
::
shared_ptr
<
T
>
ind
,
CmdArguments_t
/*
args
*/
)
{
int
range
=
ind
->
genes_m
.
size
();
int
position
=
static_cast
<
int
>
((
rand
()
/
(
RAND_MAX
+
1.0
))
*
range
);
...
...
optimizer/Pilot/Pilot.h
View file @
31b9141f
...
...
@@ -216,7 +216,7 @@ private:
protected:
void
parseInputFile
(
functionDictionary_t
known_expr_funcs
,
bool
isOptimizationRun
)
{
void
parseInputFile
(
functionDictionary_t
/*
known_expr_funcs
*/
,
bool
isOptimizationRun
)
{
try
{
input_file_
=
cmd_args_
->
getArg
<
std
::
string
>
(
"inputfile"
,
true
);
...
...
@@ -679,4 +679,4 @@ protected:
};
#endif
\ No newline at end of file
#endif
optimizer/Util/Trace/Trace.h
View file @
31b9141f
...
...
@@ -28,7 +28,7 @@ public:
pipeline_
.
push_back
(
component
);
}
void
unregisterComponent
(
std
::
string
name
)
{
void
unregisterComponent
(
std
::
string
/*
name
*/
)
{
//TODO: set null @ idx
}
...
...
optimizer/Util/Types.h
View file @
31b9141f
...
...
@@ -53,7 +53,7 @@ typedef struct {
bool
is_valid
;
template
<
class
Archive
>
void
serialize
(
Archive
&
ar
,
const
unsigned
int
version
)
{
void
serialize
(
Archive
&
ar
,
const
unsigned
int
/*
version
*/
)
{
ar
&
type
;
ar
&
value
;
ar
&
is_valid
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment