Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • OPAL/src
  • zheng_d/src
  • ext-rogers_c/src
  • ext-wang_c/src
  • cortes_c/src
  • ext-calvo_p/src
  • ext-edelen_a/src
  • albajacas_a/src
  • kraus/src
  • snuverink_j/OPAL-src
  • adelmann/src
  • muralikrishnan/src
  • wyssling_t/src
  • gsell/src
  • ext-piot_p/src
  • OPAL/opal-src-4-opalx-debug
  • winkle_m/src
17 results
Show changes
Showing
with 80 additions and 104 deletions
......@@ -19,12 +19,11 @@
// You should have received a copy of the GNU General Public License
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
//
#include "boost/smart_ptr.hpp"
#include "Util/CmdArguments.h"
template <class T> struct NaiveUniformCrossover
{
void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2,
void crossover(std::shared_ptr<T> ind1, std::shared_ptr<T> ind2,
CmdArguments_t /*args*/) {
Individual::genes_t genes_ind2 = ind2->genes_m;
......
......@@ -19,12 +19,11 @@
// You should have received a copy of the GNU General Public License
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
//
#include "boost/smart_ptr.hpp"
#include "Util/CmdArguments.h"
template <class T> struct OneBitMutation
{
void mutate(boost::shared_ptr<T> ind, CmdArguments_t /*args*/) {
void mutate(std::shared_ptr<T> ind, CmdArguments_t /*args*/) {
int range = ind->genes_m.size();
int position = static_cast<int>((rand() / (RAND_MAX + 1.0)) * range);
......
......@@ -28,6 +28,7 @@
#define __POPULATION_H__
#include <map>
#include <memory>
#include <vector>
#include <utility>
#include <queue>
......@@ -36,8 +37,6 @@
#include <fstream>
#include <sstream>
#include "boost/smart_ptr.hpp"
#include "extlib/wfgHypervolume/hypervolume.h"
......@@ -52,7 +51,7 @@ public:
~Population() {}
typedef typename Individual_t::genes_t genes_t;
typedef boost::shared_ptr<Individual_t> individual;
typedef std::shared_ptr<Individual_t> individual;
typedef std::pair< unsigned int, individual > ind_t;
/// population iterator type
......
......@@ -23,13 +23,12 @@
//
#include <cmath>
#include "boost/smart_ptr.hpp"
#include "Util/CmdArguments.h"
template <class T> struct SimulatedBinaryCrossover
{
void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2,
void crossover(std::shared_ptr<T> ind1, std::shared_ptr<T> ind2,
CmdArguments_t args) {
double nu_c = args->getArg<double>("simbin-crossover-nu", 2.0, false);
......
......@@ -26,8 +26,6 @@
#include <map>
#include <utility>
#include "boost/smart_ptr.hpp"
#include "Util/Types.h"
#include "Util/CmdArguments.h"
#include "Optimizer/EA/Population.h"
......@@ -70,7 +68,7 @@ public:
}
//FIXME: pass population as arg to variator
//boost::shared_ptr< Population<ind_t> >
//std::shared_ptr< Population<ind_t> >
population_m.reset(new Population<ind_t>());
mutationProbability_m =
......@@ -86,7 +84,7 @@ public:
}
//FIXME access population from outside
boost::shared_ptr< Population<ind_t> > population() {
std::shared_ptr< Population<ind_t> > population() {
return population_m;
}
......@@ -155,7 +153,7 @@ public:
}
/// set an individual as infeasible: replace with a new individual
void infeasible(boost::shared_ptr<ind_t> ind) {
void infeasible(std::shared_ptr<ind_t> ind) {
population_m->remove_individual(ind);
new_individual();
}
......@@ -166,7 +164,7 @@ public:
}
/// return next individual to evaluate
boost::shared_ptr<ind_t> popIndividualToEvaluate() {
std::shared_ptr<ind_t> popIndividualToEvaluate() {
unsigned int ind = individualsToEvaluate_m.front();
individualsToEvaluate_m.pop();
return population_m->get_staging(ind);
......@@ -191,13 +189,13 @@ public:
// pop first individual
unsigned int idx = tmp.front(); tmp.pop();
boost::shared_ptr<ind_t> a = population_m->get_staging(idx);
std::shared_ptr<ind_t> a = population_m->get_staging(idx);
// handle special case where we have an odd number of offspring
if(tmp.empty()) {
if (drand(1) <= mutationProbability_m) {
// temporary copy in case not successful
boost::shared_ptr<ind_t> copyA(new ind_t(a));
std::shared_ptr<ind_t> copyA(new ind_t(a));
int iter = 0;
while (true) {
// assign with shared pointer constructor
......@@ -219,13 +217,13 @@ public:
// and second if any
idx = tmp.front(); tmp.pop();
boost::shared_ptr<ind_t> b = population_m->get_staging(idx);
std::shared_ptr<ind_t> b = population_m->get_staging(idx);
// create new individuals
// temporary copy in case not successful
boost::shared_ptr<ind_t> copyA(new ind_t(a));
boost::shared_ptr<ind_t> copyB(new ind_t(b));
std::shared_ptr<ind_t> copyA(new ind_t(a));
std::shared_ptr<ind_t> copyB(new ind_t(b));
int iter = 0;
while (true) {
......@@ -271,20 +269,20 @@ protected:
/// create a new individual
void new_individual(Individual::genes_t& dvars) {
boost::shared_ptr<ind_t> ind(new ind_t(dVarBounds_m, dNames_m, constraints_m));
std::shared_ptr<ind_t> ind(new ind_t(dVarBounds_m, dNames_m, constraints_m));
std::swap(ind->genes_m, dvars);
individualsToEvaluate_m.push( population_m->add_individual(ind) );
}
/// create a new individual
void new_individual() {
boost::shared_ptr<ind_t> ind(new ind_t(dVarBounds_m, dNames_m, constraints_m));
std::shared_ptr<ind_t> ind(new ind_t(dVarBounds_m, dNames_m, constraints_m));
individualsToEvaluate_m.push( population_m->add_individual(ind) );
}
/// copy an individual
void new_individual(boost::shared_ptr<ind_t> ind) {
boost::shared_ptr<ind_t> return_ind(new ind_t(ind));
void new_individual(std::shared_ptr<ind_t> ind) {
std::shared_ptr<ind_t> return_ind(new ind_t(ind));
individualsToEvaluate_m.push(
population_m->add_individual(return_ind) ) ;
}
......@@ -292,7 +290,7 @@ protected:
private:
/// population of individuals
boost::shared_ptr< Population<ind_t> > population_m;
std::shared_ptr< Population<ind_t> > population_m;
/// user specified command line arguments
CmdArguments_t args_;
......
......@@ -44,9 +44,6 @@
#include <string>
#include <unistd.h>
#include "boost/smart_ptr.hpp"
//#include "boost/dynamic_bitset.hpp"
#include "Comm/MasterNode.h"
#include "Comm/CommSplitter.h"
......@@ -105,7 +102,7 @@ public:
// constructor only for Pilot classes inherited from this class
// they have their own setup function
Pilot(CmdArguments_t args, boost::shared_ptr<Comm_t> comm,
Pilot(CmdArguments_t args, std::shared_ptr<Comm_t> comm,
const DVarContainer_t &dvar)
: Poller(comm->mpiComm())
, comm_(comm)
......@@ -115,7 +112,7 @@ public:
// do nothing
}
Pilot(CmdArguments_t args, boost::shared_ptr<Comm_t> comm,
Pilot(CmdArguments_t args, std::shared_ptr<Comm_t> comm,
functionDictionary_t known_expr_funcs)
: Poller(comm->mpiComm())
, comm_(comm)
......@@ -124,7 +121,7 @@ public:
setup(known_expr_funcs);
}
Pilot(CmdArguments_t args, boost::shared_ptr<Comm_t> comm,
Pilot(CmdArguments_t args, std::shared_ptr<Comm_t> comm,
functionDictionary_t known_expr_funcs,
const DVarContainer_t &dvar,
const Expressions::Named_t &obj,
......@@ -163,7 +160,7 @@ protected:
/// MPI communicator used for messages between all pilots
MPI_Comm coworker_comm_;
boost::shared_ptr<Comm_t> comm_;
std::shared_ptr<Comm_t> comm_;
CmdArguments_t cmd_args_;
int global_rank_;
......@@ -174,7 +171,7 @@ protected:
typedef MasterNode< typename Opt_t::SolutionState_t,
SolPropagationGraph_t > MasterNode_t;
boost::scoped_ptr< MasterNode_t > master_node_;
std::unique_ptr< MasterNode_t > master_node_;
/// input file for simulation with embedded optimization problem
std::string input_file_;
......@@ -191,7 +188,6 @@ protected:
// keep track of state of all workers
std::vector<bool> is_worker_idle_;
//boost::dynamic_bitset<> is_worker_idle_;
/// keep track of requests and running jobs
typedef std::map<size_t, std::pair<Param_t, reqVarContainer_t> > Jobs_t;
......@@ -200,7 +196,7 @@ protected:
Jobs_t request_queue_;
//DEBUG
boost::scoped_ptr<Trace> job_trace_;
std::unique_ptr<Trace> job_trace_;
private:
void setup(functionDictionary_t known_expr_funcs,
......@@ -277,7 +273,7 @@ protected:
<< "\e[0m" << std::endl;
std::cout << os.str() << std::flush;
boost::scoped_ptr<Opt_t> opt(
const std::unique_ptr<Opt_t> opt(
new Opt_t(objectives_, constraints_, dvars_, objectives_.size(),
comm_->getBundle(), cmd_args_, hypervolRef_, comm_->getNrWorkerGroups()));
opt->initialize();
......@@ -300,7 +296,7 @@ protected:
pos = tmplfile.find(".");
std::string simName = tmplfile.substr(0,pos);
boost::scoped_ptr< Worker<Sim_t> > w(
const std::unique_ptr< Worker<Sim_t> > w(
new Worker<Sim_t>(objectives_, constraints_, simName,
comm_->getBundle(), cmd_args_, userVariables));
......@@ -320,7 +316,7 @@ protected:
trace_filename << "pilot.trace." << comm_->getBundle().island_id;
job_trace_.reset(new Trace("Optimizer Job Trace"));
job_trace_->registerComponent( "sink",
boost::shared_ptr<TraceComponent>(new FileSink(trace_filename.str())));
std::shared_ptr<TraceComponent>(new FileSink(trace_filename.str())));
worker_comm_ = comm_->getBundle().worker;
opt_comm_ = comm_->getBundle().opt;
......
......@@ -32,8 +32,6 @@
#include <iostream>
#include "boost/smart_ptr.hpp"
#include "Pilot/Poller.h"
#include "Comm/types.h"
......@@ -100,7 +98,7 @@ public:
protected:
typedef boost::scoped_ptr<Sim_t> SimPtr_t;
typedef const std::unique_ptr<Sim_t> SimPtr_t;
bool is_idle_;
MPI_Comm coworker_comm_;
......
......@@ -34,6 +34,7 @@
#define __GENERATE_SIMULATION_H__
#include <iostream>
#include <filesystem>
#include <fstream>
#include <sstream>
#include <string>
......@@ -42,7 +43,6 @@
#include <vector>
#include <boost/algorithm/string.hpp>
#include "boost/filesystem.hpp"
#include "Util/OptPilotException.h"
......@@ -144,7 +144,7 @@ private:
*/
void fillDictionary() {
namespace fs = boost::filesystem;
namespace fs = std::filesystem;
fs::path pwd = fs::current_path();
if (!fs::exists(varDictionary_) || fs::is_empty(varDictionary_))
......
......@@ -20,7 +20,6 @@
//
#include "Util/CmdArguments.h"
#include "gtest/gtest.h"
#include "boost/smart_ptr.hpp"
namespace {
......@@ -57,7 +56,7 @@ namespace {
}
// Objects declared here can be used by all tests in the test case
boost::scoped_ptr<CmdArguments> args_;
std::unique_ptr<CmdArguments> args_;
};
TEST_F(CmdArgumentsTest, RetrieveCorrectFatal) {
......
......@@ -28,7 +28,6 @@
#include "gtest/gtest.h"
#include "boost/smart_ptr.hpp"
#include "boost/tuple/tuple.hpp"
#include "boost/variant/get.hpp"
#include "boost/variant/variant.hpp"
......@@ -94,7 +93,7 @@ struct my_pow {
TEST_F(ExpressionTest, RequestedVars) {
std::string testexpr = "abs(A * A * 2.0 * b + 2.0)";
boost::scoped_ptr<Expression> e(new Expression(testexpr));
const std::unique_ptr<Expression> e(new Expression(testexpr));
std::set<std::string> reqVars = e->getReqVars();
......@@ -111,7 +110,7 @@ struct my_pow {
("abs", abs_func));
std::string testexpr = "abs(1.0 + A * A * 2.0 * B + 2.0)";
boost::scoped_ptr<Expression> e(new Expression(testexpr, funcs));
const std::unique_ptr<Expression> e(new Expression(testexpr, funcs));
double a = 5.2;
double b = -10.2;
......@@ -140,7 +139,7 @@ struct my_pow {
("abs", abs_func));
std::string testexpr = "abs(1.0 + A * 2.0) + abs(B + 2.0)";
boost::scoped_ptr<Expression> e(new Expression(testexpr, funcs));
const std::unique_ptr<Expression> e(new Expression(testexpr, funcs));
double a = 5.2;
double b = -10.2;
......@@ -173,7 +172,7 @@ struct my_pow {
("pow", pow_func));
std::string testexpr = "abs(1.0 + pow(A, 3) * 2.0) + abs(B + 2.0)";
boost::scoped_ptr<Expression> e(new Expression(testexpr, funcs));
const std::unique_ptr<Expression> e(new Expression(testexpr, funcs));
double a = 5.2;
double b = -10.2;
......@@ -196,7 +195,7 @@ struct my_pow {
TEST_F(ExpressionTest, EvaluateBooleanExpression) {
std::string testexpr = "a > 5.2 - 1e-6";
boost::scoped_ptr<Expression> e(new Expression(testexpr));
const std::unique_ptr<Expression> e(new Expression(testexpr));
double a = 5.2;
......
......@@ -28,7 +28,6 @@
#include "gtest/gtest.h"
#include "boost/smart_ptr.hpp"
#include "boost/tuple/tuple.hpp"
#include "boost/variant/get.hpp"
#include "boost/variant/variant.hpp"
......@@ -95,7 +94,7 @@ struct my_pow {
("fromFile", ff));
std::string testexpr = "fromFile(\"resources/fromfile_test.dat\")";
boost::scoped_ptr<Expression> e(new Expression(testexpr, funcs));
const std::unique_ptr<Expression> e(new Expression(testexpr, funcs));
Expressions::Result_t result;
EXPECT_NO_THROW({
result = e->evaluate(vars);
......@@ -126,7 +125,7 @@ struct my_pow {
std::string testexpr = "sqrt(pow(fromFile(\"resources/fromfile_test.dat\"), 2) + "
"pow(fromFile(\"resources/fromfile_test2.dat\"), 2))";
boost::scoped_ptr<Expression> e(new Expression(testexpr, funcs));
const std::unique_ptr<Expression> e(new Expression(testexpr, funcs));
Expressions::Result_t result;
EXPECT_NO_THROW({
result = e->evaluate(vars);
......
......@@ -22,8 +22,6 @@
#include "Optimizer/EA/Individual.h"
#include "gtest/gtest.h"
#include "boost/smart_ptr.hpp"
#include <string>
namespace {
......@@ -55,7 +53,7 @@ namespace {
// before the destructor).
}
boost::shared_ptr<Individual> createIndividual(size_t num_genes, std::string constraint="") {
std::shared_ptr<Individual> createIndividual(size_t num_genes, std::string constraint="") {
Individual::bounds_t bounds;
Individual::names_t names;
......@@ -69,7 +67,7 @@ namespace {
constraints.insert(std::pair<std::string,Expressions::Expr_t*>
("constraint0",new Expressions::Expr_t(constraint)));
boost::shared_ptr<Individual> ind(new Individual(bounds,names,constraints));
std::shared_ptr<Individual> ind(new Individual(bounds,names,constraints));
return ind;
}
......@@ -80,7 +78,7 @@ namespace {
TEST_F(IndividualTest, IndividualRespectsBounds) {
size_t num_genes = 1;
boost::shared_ptr<Individual> ind = createIndividual(num_genes);
std::shared_ptr<Individual> ind = createIndividual(num_genes);
double gene = ind->genes_m[0];
EXPECT_LE(lower_bound_, gene) << "gene should respect lower bound";
......@@ -95,7 +93,7 @@ namespace {
TEST_F(IndividualTest, IndividualHasCorrectNumberOfGenes) {
size_t num_genes = 12;
boost::shared_ptr<Individual> ind = createIndividual(num_genes);
std::shared_ptr<Individual> ind = createIndividual(num_genes);
size_t my_size = ind->genes_m.size();
EXPECT_EQ(static_cast<size_t>(num_genes), my_size)
......@@ -106,7 +104,7 @@ namespace {
TEST_F(IndividualTest, IndividualRandomGene) {
size_t num_genes = 1;
boost::shared_ptr<Individual> ind = createIndividual(num_genes);
std::shared_ptr<Individual> ind = createIndividual(num_genes);
double gene = ind->genes_m[0];
double new_gene = ind->new_gene(0);
......@@ -121,7 +119,7 @@ namespace {
// create several individuals to test
for (int i=0; i<10; i++) {
boost::shared_ptr<Individual> ind = createIndividual(num_genes,constraint);
std::shared_ptr<Individual> ind = createIndividual(num_genes,constraint);
double gene0 = ind->genes_m[0];
double gene1 = ind->genes_m[1];
EXPECT_LE((gene0+gene1)/2, half) << "constraint should be respected";
......
......@@ -20,7 +20,6 @@
//
#include "Util/ManagedIDs.h"
#include "gtest/gtest.h"
#include "boost/smart_ptr.hpp"
namespace {
......@@ -51,7 +50,7 @@ namespace {
}
// Objects declared here can be used by all tests in the test case
boost::scoped_ptr<ManagedIDs> ids_;
std::unique_ptr<ManagedIDs> ids_;
};
TEST_F(ManagedIDsTest, OneID) {
......
......@@ -22,7 +22,7 @@
#include "Optimizer/EA/Individual.h"
#include "gtest/gtest.h"
#include "boost/smart_ptr.hpp"
#include <memory>
namespace {
......@@ -53,7 +53,7 @@ namespace {
// population_->clean_population();
}
boost::shared_ptr<Individual> createIndividual(size_t num_genes) {
std::shared_ptr<Individual> createIndividual(size_t num_genes) {
Individual::bounds_t bounds;
Individual::names_t names;
......@@ -63,24 +63,24 @@ namespace {
names.push_back("dvar"+std::to_string(i));
}
boost::shared_ptr<Individual> ind(new Individual(bounds,names,constraints));
std::shared_ptr<Individual> ind(new Individual(bounds,names,constraints));
return ind;
}
// Objects declared here can be used by all tests in the test case
boost::scoped_ptr< Population<Individual> > population_;
std::unique_ptr< Population<Individual> > population_;
};
TEST_F(PopulationTest, AddOneIndividual) {
boost::shared_ptr<Individual> ind = createIndividual(1);
std::shared_ptr<Individual> ind = createIndividual(1);
unsigned int id = population_->add_individual(ind);
double gene = ind->genes_m[0];
double obj = ind->objectives_m[0];
EXPECT_EQ(static_cast<size_t>(0), id) << "first individuals id should be 0";
boost::shared_ptr<Individual> tmp = population_->get_individual(id);
std::shared_ptr<Individual> tmp = population_->get_individual(id);
EXPECT_EQ(0, tmp.get()) << "no committed individuals after insert";
tmp = population_->get_staging(id);
......@@ -95,7 +95,7 @@ namespace {
TEST_F(PopulationTest, CommitOneIndividual) {
boost::shared_ptr<Individual> ind = createIndividual(1);
std::shared_ptr<Individual> ind = createIndividual(1);
unsigned int id = population_->add_individual(ind);
double gene = ind->genes_m[0];
double obj = ind->objectives_m[0];
......@@ -104,7 +104,7 @@ namespace {
population_->commit_individuals();
boost::shared_ptr<Individual> tmp = population_->get_staging(id);
std::shared_ptr<Individual> tmp = population_->get_staging(id);
EXPECT_EQ(0, tmp.get()) << "no staging individuals after commit";
tmp = population_->get_individual(id);
......@@ -118,10 +118,10 @@ namespace {
TEST_F(PopulationTest, KeepIndividuals) {
boost::shared_ptr<Individual> ind1 = createIndividual(1);
boost::shared_ptr<Individual> ind2 = createIndividual(1);
boost::shared_ptr<Individual> ind3 = createIndividual(1);
boost::shared_ptr<Individual> ind4 = createIndividual(1);
std::shared_ptr<Individual> ind1 = createIndividual(1);
std::shared_ptr<Individual> ind2 = createIndividual(1);
std::shared_ptr<Individual> ind3 = createIndividual(1);
std::shared_ptr<Individual> ind4 = createIndividual(1);
size_t id0 = population_->add_individual(ind1);
EXPECT_EQ(static_cast<size_t>(0), id0);
......@@ -143,17 +143,17 @@ namespace {
size_t size = population_->size();
EXPECT_EQ(survivors.size(), size);
boost::shared_ptr<Individual> tmp = population_->get_individual(id1);
std::shared_ptr<Individual> tmp = population_->get_individual(id1);
EXPECT_EQ(ind2->genes_m[0], tmp->genes_m[0]);
EXPECT_EQ(ind2->objectives_m[0], tmp->objectives_m[0]);
}
TEST_F(PopulationTest, IDsContinuous) {
boost::shared_ptr<Individual> ind0 = createIndividual(1);
boost::shared_ptr<Individual> ind1 = createIndividual(1);
boost::shared_ptr<Individual> ind2 = createIndividual(1);
boost::shared_ptr<Individual> ind3 = createIndividual(1);
std::shared_ptr<Individual> ind0 = createIndividual(1);
std::shared_ptr<Individual> ind1 = createIndividual(1);
std::shared_ptr<Individual> ind2 = createIndividual(1);
std::shared_ptr<Individual> ind3 = createIndividual(1);
size_t id0 = population_->add_individual(ind0);
EXPECT_EQ(static_cast<size_t>(0), id0);
......@@ -167,30 +167,30 @@ namespace {
unsigned int individual_to_be_removed_id = 1;
population_->remove_individual(ind1);
boost::shared_ptr<Individual> newind = createIndividual(1);
std::shared_ptr<Individual> newind = createIndividual(1);
unsigned int id_new = population_->add_individual(newind);
EXPECT_EQ(individual_to_be_removed_id, id_new);
boost::shared_ptr<Individual> tmp = population_->get_staging(id_new);
std::shared_ptr<Individual> tmp = population_->get_staging(id_new);
EXPECT_EQ(newind->genes_m[0], tmp->genes_m[0]);
EXPECT_EQ(newind->objectives_m[0], tmp->objectives_m[0]);
}
TEST_F(PopulationTest, FindNonExistingStaging) {
boost::shared_ptr<Individual> tmp = population_->get_staging(124);
std::shared_ptr<Individual> tmp = population_->get_staging(124);
EXPECT_EQ(0, tmp.get());
}
TEST_F(PopulationTest, FindNonExistingIndividual) {
boost::shared_ptr<Individual> tmp = population_->get_individual(124);
std::shared_ptr<Individual> tmp = population_->get_individual(124);
EXPECT_EQ(0, tmp.get());
}
TEST_F(PopulationTest, RepresentedCheck) {
boost::shared_ptr<Individual> ind = createIndividual(1);
std::shared_ptr<Individual> ind = createIndividual(1);
population_->add_individual(ind);
population_->add_individual(ind);
......
......@@ -29,7 +29,6 @@
#include "gtest/gtest.h"
#include "boost/smart_ptr.hpp"
#include "boost/tuple/tuple.hpp"
#include "boost/variant/get.hpp"
#include "boost/variant/variant.hpp"
......@@ -77,7 +76,7 @@ namespace {
("python", python));
std::string testexpr = "python(\"resources/test.py\", 1.0)";
boost::scoped_ptr<Expression> e(new Expression(testexpr, funcs));
const std::unique_ptr<Expression> e(new Expression(testexpr, funcs));
Expressions::Result_t result;
EXPECT_NO_THROW({
result = e->evaluate(vars);
......
......@@ -29,7 +29,6 @@
#include "gtest/gtest.h"
#include "boost/smart_ptr.hpp"
#include "boost/tuple/tuple.hpp"
#include "boost/type_traits/remove_cv.hpp"
#include "boost/variant/get.hpp"
......@@ -80,7 +79,7 @@ namespace {
("sumErrSq", errsumsq));
std::string testexpr = "sumErrSq(\"resources/measurement_test.dat\", \"rms_x\", \"resources/test.stat\")";
boost::scoped_ptr<Expression> e(new Expression(testexpr, funcs));
const std::unique_ptr<Expression> e(new Expression(testexpr, funcs));
Expressions::Result_t result;
EXPECT_NO_THROW({
result = e->evaluate(vars);
......
......@@ -22,7 +22,6 @@
#include <algorithm>
#include <string.h>
#include "mpi.h"
#include "boost/smart_ptr.hpp"
#include "boost/bind.hpp"
class AsyncSendBuffer {
......@@ -80,7 +79,7 @@ class AsyncSendBuffers {
public:
AsyncSendBuffers() {}
void insert(boost::shared_ptr<AsyncSendBuffer> buf) {
void insert(std::shared_ptr<AsyncSendBuffer> buf) {
collection_.push_back(buf);
}
......@@ -95,6 +94,6 @@ public:
}
private:
std::vector< boost::shared_ptr<AsyncSendBuffer> > collection_;
std::vector< std::shared_ptr<AsyncSendBuffer> > collection_;
};
......@@ -29,12 +29,12 @@
#define __CMD_ARGUMENTS__
#include <map>
#include <memory>
#include <string>
#include <iostream>
#include <sstream>
#include <set>
#include "boost/smart_ptr.hpp"
#include "boost/utility/value_init.hpp"
#include "Util/OptPilotException.h"
......@@ -173,7 +173,7 @@ private:
};
typedef boost::shared_ptr<CmdArguments> CmdArguments_t;
typedef std::shared_ptr<CmdArguments> CmdArguments_t;
template<class T>
inline T CmdArguments::arg(const std::string name) {
......
......@@ -22,7 +22,6 @@
#define __TIMESTAMP_H__
#include <sstream>
#include <boost/chrono.hpp>
#include <ctime>
#include "Util/Trace/TraceComponent.h"
......@@ -40,9 +39,9 @@ public:
void execute(std::ostringstream &dump) {
boost::chrono::time_point<boost::chrono::system_clock> now;
now = boost::chrono::system_clock::now();
std::time_t now_time = boost::chrono::system_clock::to_time_t(now);
std::chrono::time_point<std::chrono::system_clock> now;
now = std::chrono::system_clock::now();
std::time_t now_time = std::chrono::system_clock::to_time_t(now);
std::ostringstream timestamp;
timestamp << std::ctime(&now_time);
......
......@@ -26,8 +26,6 @@
#include <vector>
#include <map>
#include "boost/smart_ptr.hpp"
#include "Util/Trace/TraceComponent.h"
class Trace {
......@@ -42,7 +40,7 @@ public:
{}
void registerComponent(std::string name,
boost::shared_ptr<TraceComponent> component) {
std::shared_ptr<TraceComponent> component) {
nameToIdx_.insert(
std::pair<std::string, size_t>(name, pipeline_.size()));
pipeline_.push_back(component);
......@@ -53,7 +51,7 @@ public:
}
void log(std::ostringstream &dump) {
for(boost::shared_ptr<TraceComponent> component : pipeline_) {
for(std::shared_ptr<TraceComponent> component : pipeline_) {
component->execute(dump);
}
}
......@@ -62,7 +60,7 @@ private:
std::string name_;
std::vector< boost::shared_ptr<TraceComponent> > pipeline_;
std::vector< std::shared_ptr<TraceComponent> > pipeline_;
std::map< std::string, size_t > nameToIdx_;
};
......