Commit c304c8e5 authored by Damien Leroux's avatar Damien Leroux
Browse files

Code is now fully clang++-compliant. There is a bug with QR though.

parent d9415397
......@@ -786,10 +786,10 @@ namespace Eigen {
IsSigned = 0,
RequireInitialization = 1
};
static Real epsilon() { return {{{0, 0}, {0, 0}}, algebraic_genotype::Type::Genotype, {0, 0, {0}}}; }
static Real dummy_precision() { return {{{0, 0}, {0, 0}}, algebraic_genotype::Type::Genotype, {0, 0, {0}}}; }
static algebraic_genotype highest() { return {{{0, 0}, {0, 0}}, algebraic_genotype::Type::Genotype, {32767, 32767, {1}}}; }
static algebraic_genotype lowest() { return {{{0, 0}, {0, 0}}, algebraic_genotype::Type::Genotype, {0, 0, {0}}}; }
static Real epsilon() { return {{{0, 0}, {0, 0}}, algebraic_genotype::Type::Genotype, fast_polynom::zero}; }
static Real dummy_precision() { return {{{0, 0}, {0, 0}}, algebraic_genotype::Type::Genotype, fast_polynom::zero}; }
static algebraic_genotype highest() { return {{{0, 0}, {0, 0}}, algebraic_genotype::Type::Genotype, fast_polynom::infinity}; }
static algebraic_genotype lowest() { return {{{0, 0}, {0, 0}}, algebraic_genotype::Type::Genotype, fast_polynom::zero}; }
};
template<>
......
......@@ -87,7 +87,7 @@ operator & (cache_file<CACHE_DIRECTION>& c, std::tuple<Elems...>& t)
template <int I, int N, typename CACHE_DIRECTION, typename... Elems>
typename std::enable_if<I == N, cache_file<CACHE_DIRECTION>>::type&
operator & (cache_file<CACHE_DIRECTION>& c, std::tuple<Elems...>& t)
operator & (cache_file<CACHE_DIRECTION>& c, std::tuple<Elems...>&)
{
return c;
}
......
......@@ -463,7 +463,7 @@ template <typename Ret, typename... Args>
{
chrono_trace _(get_func_name(func));
Ret ret = func(args...);
unregister_task_in_progress(func, args...);
unregister_task_in_progress(func, {args}...);
return ret;
}, *args...))
, mutex()
......
......@@ -34,7 +34,24 @@ struct message_struc {
typedef std::shared_ptr<message_struc> message_handle;
/*#define MAKE_MESSAGE(_dest_, _expr_) do { std::stringstream __s; __s << _expr_; _dest_ = __s.str(); } while (0)*/
#define MESSAGE(_expr_) dynamic_cast<std::stringstream*>(&(std::stringstream() << _expr_))->str()
static inline std::string __fetch_string(const std::ostream& os)
{
return dynamic_cast<const std::stringstream*>(&os)->str();
}
static inline
std::ostream& operator << (std::ostream& os, const std::vector<double>& v)
{
std::string sep = "";
for (auto x: v) { os << sep << x; sep = " "; }
return os;
}
#define MESSAGE(_expr_) __fetch_string(std::stringstream() << _expr_)
/*#define CREATE_MESSAGE(_var_, _channel_, _expr_) message_handle _var_(new message_struc {_channel_, MESSAGE(_expr_)});*/
#ifndef SPELL_UNSAFE_OUTPUT
......
......@@ -171,6 +171,7 @@ struct fast_polynom {
static fast_polynom one;
static fast_polynom r;
static fast_polynom s;
static fast_polynom infinity;
int degree() const;
int valuation() const;
......
......@@ -17,10 +17,15 @@ namespace impl {
polynom one(d_polynom({1}), f_polynom(0, 0));
polynom r(d_polynom({0, 1}), f_polynom(1, 0));
polynom s(d_polynom({1, -1}), f_polynom(0, 1));
/*f_polynom finf(100, 100);*/
/*d_polynom dinf = finf;*/
/*polynom pinf(d_polynom(f_polynom(100, 100)), f_polynom(100, 100));*/
/*fast_polynom::infinity = reg(pinf);*/
fast_polynom::zero = reg(zero);
fast_polynom::one = reg(one);
fast_polynom::r = reg(r);
fast_polynom::s = reg(s);
fast_polynom::infinity = fast_polynom::one;
}
fast_polynom reg(const polynom& p)
......
......@@ -22,6 +22,20 @@ namespace impl {
#endif
inline std::ostream& operator << (std::ostream& os, const std::pair<double, double>& p)
{
return os << '(' << p.first << ',' << p.second << ')';
}
template <typename VALUE_TYPE>
std::ostream& operator << (std::ostream& os, const std::vector<VALUE_TYPE>& v)
{
std::string sep = "";
for (auto x: v) { os << sep << x; sep = " "; }
return os;
}
namespace Eigen {
template<>
struct NumTraits<std::string> {
......
......@@ -42,7 +42,7 @@ inline std::ostream& operator << (std::ostream& os, const std::set<subset>& S)
template <typename scalar_type>
struct exact_compare {
typedef scalar_type key_type;
bool operator () (const scalar_type& s1, const scalar_type& s2)
bool operator () (const scalar_type& s1, const scalar_type& s2) const
{
return s1 < s2;
}
......@@ -98,11 +98,11 @@ struct fuzzy_compare<algebraic_genotype> {
}
}
};
bool operator () (const algebraic_genotype& s1, const algebraic_genotype& s2)
bool operator () (const algebraic_genotype& s1, const algebraic_genotype& s2) const
{
return s1.poly.inf(s2.poly);
}
bool operator () (const key_type& s1, const algebraic_genotype& s2)
bool operator () (const key_type& s1, const algebraic_genotype& s2) const
{
bool ok = true;
for (auto s: s1.keys) {
......@@ -110,7 +110,7 @@ struct fuzzy_compare<algebraic_genotype> {
}
return ok;
}
bool operator () (const algebraic_genotype& s1, const key_type& s2)
bool operator () (const algebraic_genotype& s1, const key_type& s2) const
{
bool ok = true;
for (auto s: s2.keys) {
......@@ -118,7 +118,7 @@ struct fuzzy_compare<algebraic_genotype> {
}
return ok;
}
bool operator () (const key_type& s1, const key_type& s2)
bool operator () (const key_type& s1, const key_type& s2) const
{
bool ok = true;
for (auto a: s1.keys) {
......@@ -174,19 +174,19 @@ template <>
struct greedy_compare<algebraic_genotype> {
typedef locus_pair key_type;
bool operator () (const algebraic_genotype& s1, const algebraic_genotype& s2)
bool operator () (const algebraic_genotype& s1, const algebraic_genotype& s2) const
{
return s1.genotype < s2.genotype;
}
bool operator () (const key_type& s1, const algebraic_genotype& s2)
bool operator () (const key_type& s1, const algebraic_genotype& s2) const
{
return s1 < s2.genotype;
}
bool operator () (const algebraic_genotype& s1, const key_type& s2)
bool operator () (const algebraic_genotype& s1, const key_type& s2) const
{
return s1.genotype < s2;
}
bool operator () (const key_type& s1, const key_type& s2)
bool operator () (const key_type& s1, const key_type& s2) const
{
return s1 < s2;
}
......
......@@ -21,13 +21,6 @@
using namespace Eigen;
template <typename VALUE_TYPE>
std::ostream& operator << (std::ostream& os, const std::vector<VALUE_TYPE>& v)
{
std::string sep = "";
for (auto x: v) { os << sep << x; sep = " "; }
return os;
}
struct ancestor_allele {
......
......@@ -687,19 +687,39 @@ struct model {
/*MSG_DEBUG("DEBUG Y" << std::endl << (*m_Y));*/
/*MSG_DEBUG("X:" << std::endl << (*m_X));*/
MSG_DEBUG(MATRIX_SIZE(X()) << ' ' << MATRIX_SIZE(Y()) << std::endl);
MSG_DEBUG("XtX" << std::endl <<
(m_X->transpose() * (*m_X)));
MSG_DEBUG("XtX^-1" << std::endl << XtX_pseudo_inverse());
MSG_DEBUG("XtX^-1 * Xt * Y" << std::endl <<
XtX_pseudo_inverse() * X().transpose() * Y());
if (m_solver_type == SolverType::QR) {
/*MSG_DEBUG((*m_X));*/
int m_columns = m_X->outerSize();
/*MSG_DEBUG(MATRIX_SIZE(X()) << ' ' << MATRIX_SIZE(Y()) << std::endl);*/
FullPivHouseholderQR<MatrixXd> solver(*m_X);
{
MatrixXd Q = solver.matrixQ();
MatrixXd QR = solver.matrixQR();
MSG_DEBUG("Q" << std::endl << Q);
MSG_DEBUG("Q.Qt" << std::endl << (Q * Q.transpose()));
MSG_DEBUG("QR" << std::endl << QR);
}
MSG_DEBUG("Threshold: " << COMPONENT_EPSILON);
solver.setThreshold(COMPONENT_EPSILON);
m_rank = solver.rank();
MSG_DEBUG("Rank: " << m_rank);
m_coefficients->resize(m_columns, Y().outerSize());
MSG_DEBUG(MATRIX_SIZE((*m_coefficients)));
for (int i = 0; i < Y().outerSize(); ++i) {
m_coefficients->col(i) = solver.solve(Y().col(i));
MSG_DEBUG(MATRIX_SIZE(Y().col(i)) << std::endl << Y().col(i));
MatrixXd tmp = solver.solve(Y().col(i));
MSG_DEBUG(MATRIX_SIZE(tmp) << std::endl << tmp);
m_coefficients->col(i) = tmp;
}
} else {
JacobiSVD<MatrixXd> solver(*m_X);
MatrixXd x = *m_X;
JacobiSVD<MatrixXd> solver(x);
m_rank = 0;
int nzsv = solver.nonzeroSingularValues();
......@@ -707,10 +727,16 @@ struct model {
m_rank += !around_zero(solver.singularValues()(i));
}
*m_coefficients = solver.solve(Y());
MatrixXd y = Y();
/* FIXME: there's a segfault somewhere around HERE. */
*m_coefficients = solver.solve(y);
}
MSG_DEBUG("Coefficients:" << std::endl << m_coefficients);
*m_residuals = Y() - X() * (*m_coefficients);
MSG_DEBUG("Residuals:" << std::endl << m_residuals);
*m_rss = m_residuals->array().square().colwise().sum();
MSG_DEBUG("RSS:" << std::endl << m_rss);
#if 0
if (m_X->outerSize() == 129 && m_rank == 2) {
MSG_DEBUG("==============================================================" << std::endl
......
......@@ -20,7 +20,7 @@ void f_test(const model& model_current, const model& model_new, int col_num, Mat
int dof_cur = model_current.rank();
int dof_new = model_new.rank();
int nind = model_current.Y().innerSize();
#if 0
#if 1
/*if (model_new.coefficients().outerSize() == 1) {*/
/*MSG_DEBUG("==================================================================");*/
/*MSG_DEBUG("nind " << nind);*/
......@@ -33,8 +33,10 @@ void f_test(const model& model_current, const model& model_new, int col_num, Mat
/*MSG_DEBUG("XtX^-1" << std::endl << model_new.XtX_pseudo_inverse());*/
MSG_DEBUG("dof_cur " << dof_cur << ' ' << MATRIX_SIZE(model_current.X()) << " dof_new " << dof_new << ' ' << MATRIX_SIZE(model_new.X()) << " rss_cur " << rss_cur.transpose() << " rss_new " << rss_new.transpose() << " keys_cur " << model_current.keys() << " keys_new " << model_new.keys());
/*MSG_DEBUG("X_cur" << std::endl << model_current.X());*/
/*MSG_DEBUG("X_new" << std::endl << model_new.X());*/
MSG_DEBUG("Y_cur" << std::endl << model_current.Y());
MSG_DEBUG("Y_new" << std::endl << model_new.Y());
MSG_DEBUG("X_cur" << std::endl << model_current.X());
MSG_DEBUG("X_new" << std::endl << model_new.X());
/*MSG_DEBUG("XtX_cur" << std::endl << model_current.XtX());*/
/*MSG_DEBUG("XtX_new" << std::endl << model_new.XtX());*/
......
......@@ -2,8 +2,8 @@
TARGET=spell-qtl
GCC_VERSION=-4.9
CXX=g++$(GCC_VERSION) --std=gnu++0x
#CXX=clang++ -std=c++11 --gcc-toolchain=/usr/local/
#CXX=g++$(GCC_VERSION) --std=gnu++0x -Wno-unused-local-typedefs
CXX=clang++ -std=c++11 -stdlib=libc++
#LD=g++-4.9
LD=$(CXX)
......@@ -14,7 +14,7 @@ LD=$(CXX) -pie
LIBS=-rdynamic -lexpat -ldl
VERSION_PATCH=$(shell git rev-list --count `git rev-list --tags --max-count=1`..HEAD 2>/dev/null || echo 0)
VERSION_DEFINES=$(shell git tag | sed 's/\([0-9]*\)[.]\([0-9]*\)\([.][0-9]*\)\?/-DVERSION_MAJOR=\\\"\1\\\" -DVERSION_MINOR=\\\"\2\\\" -DVERSION_PATCH=\\\"$(VERSION_PATCH)\\\"/')
CXXARGS=-Wextra -Wall -pthread -Wno-unused-local-typedefs -fPIC -DEIGEN_NO_DEPRECATED_WARNING $(VERSION_DEFINES)
CXXARGS=-Wextra -Wall -pthread -fPIC -DEIGEN_NO_DEPRECATED_WARNING $(VERSION_DEFINES)
#CXXARGS=-Wextra -Wall -pthread -fPIC -DEIGEN_NO_DEPRECATED_WARNING $(VERSION_DEFINES)
C=$(CXX) $(CXXARGS) $(INC) -DTEST_POLY $(VERSION_DEFINES) -Wno-deprecated-register -Wno-deprecated
......@@ -34,8 +34,8 @@ DEP=$(subst .cc,.d,$(SRC))
COV_OBJ=$(subst .cc,.cov.o,$(SRC))
#DEBUG_OPTS=-ggdb
#DEBUG_OPTS=-ggdb -DNDEBUG
OPT_OPTS=-O3 -DEIGEN_NO_DEBUG -DNDEBUG
DEBUG_OPTS=-ggdb -DNDEBUG
#OPT_OPTS=-O3 -DEIGEN_NO_DEBUG -DNDEBUG
#OPT_OPTS=-O -DEIGEN_NO_DEBUG -DNDEBUG
#OPT_OPTS=-DEIGEN_NO_DEBUG -DNDEBUG
#OPT_OPTS=-O -DNDEBUG
......
......@@ -65,8 +65,7 @@ trait_permutations(const std::string& trait_name, int n)
value<MatrixXd> ret = MatrixXd();
ret->resize(n_rows, n);
n_rows = 0;
int t = 0;
for (auto& pop: active_settings->populations) {
for (size_t t = 0; t < active_settings->populations.size(); ++t) {
size_t ts = traits[t]->size();
auto slice = ret->middleRows(n_rows, ts);
for (int j = 0; j < n; ++j) {
......@@ -77,7 +76,6 @@ trait_permutations(const std::string& trait_name, int n)
std::random_shuffle(col.data(), col.data() + ts);
}
n_rows += ts;
++t;
}
return ret;
}
......@@ -125,12 +123,13 @@ residuals_permutations(const model& M, int n)
value<MatrixXd> ret = MatrixXd();
ret->resize(n_rows, n);
n_rows = 0;
int t = 0;
/*int t = 0;*/
/* FIXME: only works for ONE trait at a time */
/*std::cerr << "ret$dim(" << ret->innerSize() << ',' << ret->outerSize() << ')' << std::endl;*/
/*std::cerr << "residuals$dim(" << M.residuals().innerSize() << ',' << M.residuals().outerSize() << ')' << std::endl;*/
ret->colwise() = M.residuals().col(0);
for (auto& pop: active_settings->populations) {
/*for (auto& pop: active_settings->populations) {*/
for (size_t t = 0; t < active_settings->populations.size(); ++t) {
size_t ts = sizes[t];
auto slice = ret->middleRows(n_rows, ts);
for (int j = 0; j < n; ++j) {
......@@ -138,7 +137,7 @@ residuals_permutations(const model& M, int n)
std::random_shuffle(col.data(), col.data() + ts);
}
n_rows += ts;
++t;
/*++t;*/
}
return ret;
}
......@@ -524,7 +523,7 @@ contrast_groups(const collection<population_value>& all_pops, const locus_key& l
/*MSG_DEBUG(ck);*/
return make_value<Mem>(compute_state_to_parental_origin,
value<context_key>{ck},
lk->parent)->row_labels;
as_value(lk->parent))->row_labels;
};
DUMP_FILE_LINE();
......@@ -589,7 +588,7 @@ disassemble_parental_origins_multipop(
/*MSG_DEBUG(ck);*/
return make_value<Mem>(compute_state_to_parental_origin,
value<context_key>{ck},
lk)->row_labels;
as_value(lk))->row_labels;
};
DUMP_FILE_LINE();
......@@ -810,7 +809,8 @@ f_test_with_permutations(const std::string& trait, int n_permut, chromosome_valu
double
qtl_threshold(const std::string& trait_name, chromosome_value chr, const locus_key& lk, double quantile, int n_permut)
{
value<VectorXd> maxima = make_value<Disk|Sync>(f_test_with_permutations, trait_name, n_permut, chr, value<locus_key>{lk});
value<VectorXd> maxima = make_value<Disk|Sync>(f_test_with_permutations,
as_value(trait_name), as_value(n_permut), as_value(chr), as_value(lk));
return get_quantiles(*maxima, {quantile})[0];
}
......@@ -819,7 +819,9 @@ double qtl_threshold_all_chromosomes(const std::string& trait_name, double quant
collection<VectorXd> tmp;
for (auto& qc: active_settings->working_set) {
value<const qtl_chromosome*> qtl_chr = &qc;
tmp.push_back(make_value<Disk|Sync>(f_test_with_permutations, trait_name, n_permut, value<chromosome_value>{(*qtl_chr)->chr}, value<locus_key>{locus_key(new locus_key_struc())}));
tmp.push_back(make_value<Disk|Sync>(f_test_with_permutations,
as_value(trait_name), as_value(n_permut),
as_value((*qtl_chr)->chr), as_value(locus_key(new locus_key_struc()))));
}
size_t sz = 0;
for (auto& v: tmp) {
......
......@@ -180,7 +180,7 @@ template <typename T>
void dump_hash(const std::string& n, const T& x)
{
std::hash<T> h;
/*MSG_DEBUG("hash(" << n << ") = " << h(x));*/
MSG_DEBUG("hash(" << n << ") = " << h(x));
}
#if 0
......@@ -222,7 +222,6 @@ parental_origin2(const context_key& ck,
}
/* Compute the joint probability of selected loci UNION new locus */
geno_prob_type
joint_geno_prob_at_locus(const context_key& ck, const locus_key& lk)
......@@ -233,8 +232,8 @@ joint_geno_prob_at_locus(const context_key& ck, const locus_key& lk)
auto it = ck->locus_indices.find(lk->locus);
if (it == ck->locus_indices.end()) {
/* FIXME: whine */
MSG_ERROR("THIS LOCUS DOESN'T EXIST IN THIS CONTEXT! ck.loci=[" << ck->loci << "] locus=" << lk->locus, "");
MSG_QUEUE_FLUSH();
/*MSG_ERROR("THIS LOCUS DOESN'T EXIST IN THIS CONTEXT! ck.loci=[" << ck->loci << "] locus=" << lk->locus, "");*/
/*MSG_QUEUE_FLUSH();*/
throw 0;
return {};
}
......
......@@ -8,7 +8,7 @@
using namespace Eigen;
#define MCQTL_PATH "/media/Stock/devel/MCQTL/MultiCrossQTL/build/bin/Linux/"
#define MCQTL_PATH "/home/daleroux/MCQTL/MultiCrossQTL/build/bin/Linux/"
#define TRANSLATE_DATA MCQTL_PATH "TranslateData"
#define PROBAPOP MCQTL_PATH "ProbaPop"
#define REDIRECT_QUIET " > /dev/null"
......
#include "input.h"
#include "x2c.h"
#if 0
static inline
std::istream& operator >> (std::istream& is, ancestor_allele& aa)
{
......@@ -25,6 +26,7 @@ std::istream& operator >> (std::istream& is, allele_pair& ap)
{
return is >> ap.first >> ap.second;
}
#endif
typedef std::pair<std::string, marker_observation_spec> format_specification_keyvalue;
......
......@@ -108,7 +108,11 @@ int main(int argc, const char** argv)
/* some screen management */
if (msg_handler_t::color() && active_settings->parallel > 1) {
MSG_DEBUG("\x1b[2J\x1b[0;0H" << std::endl << std::endl << std::endl << std::endl);
MSG_INFO("Command: " << std::vector<const char*>(argv, argv + argc));
std::stringstream sargs;
for (const char** a = argv + 1; *a; ++a) {
sargs << " " << (*a);
}
MSG_INFO("Command:" << sargs.str());
}
/* FIXME working set? */
......
......@@ -15,6 +15,7 @@ fast_polynom fast_polynom::zero = 0;
fast_polynom fast_polynom::one = 0;
fast_polynom fast_polynom::r = 0;
fast_polynom fast_polynom::s = 0;
fast_polynom fast_polynom::infinity = 0;
const algebraic_genotype algebraic_genotype::null = {{{0, 0}, {0, 0}}, algebraic_genotype::Type::Null, fast_polynom::zero};
......
GCC_VERSION=-4.9
CXX=g++$(GCC_VERSION)
CXXARGS=--std=gnu++0x -Wall -Wno-unused-local-typedefs -DEIGEN_NO_DEPRECATED_WARNING -pthread -DSPELL_UNSAFE_OUTPUT
COV=gcov$(GCC_VERSION)
INC=-I../include -I../include/input -I/usr/local/include/eigen3
#CXX=clang++ -stdlib=libc++
#CXXARGS=--std=c++11 -Wall -Wno-unused-local-typedefs -DEIGEN_NO_DEPRECATED_WARNING -pthread -DSPELL_UNSAFE_OUTPUT
CXXARGS=--std=c++11 -Wall -DEIGEN_NO_DEPRECATED_WARNING -pthread -DSPELL_UNSAFE_OUTPUT
COV=gcov #llvm-cov-3.4 #gcov #$(GCC_VERSION)
INC=-I../include -I../include/input -I/home/daleroux/include/eigen3.1 -I/home/daleroux/include
LD=$(CXX)
LIBS=-rdynamic -lexpat -ldl
VERSION_DEFINES=$(shell git tag | sed 's/\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)/-DVERSION_MAJOR=\\\"\1\\\" -DVERSION_MINOR=\\\"\2\\\" -DVERSION_PATCH=\\\"\3\\\"/')
......@@ -20,7 +22,8 @@ DEBUG_OPTS=-ggdb -DNDEBUG
#OPT_OPTS=-O3 -DEIGEN_NO_DEBUG -DNDEBUG
#COV_OPTS=-g -fprofile-arcs -ftest-coverage
COV_OPTS=$(DEBUG_OPTS) --coverage
COV_OPTS=--coverage
#COV_OPTS=-Xclang -coverage-cfg-checksum -Xclang -coverage-no-function-names-in-data -Xclang -coverage-version='408*'
PROF_OPTS=-pg -O
......@@ -28,7 +31,7 @@ INFO_FILE=test-coverage.info
#C=$(CXX) $(CXXARGS) $(INC) $(DEBUG_OPTS)
C=$(CXX) $(CXXARGS) $(INC) $(DEBUG_OPTS) $(PROF_OPTS) $(VERSION_DEFINES) $(COV_OPTS)
C=$(CXX) $(CXXARGS) $(INC) $(OPT_OPTS) $(DEBUG_OPTS) $(VERSION_DEFINES)
C=$(CXX) $(CXXARGS) $(INC) $(OPT_OPTS) $(DEBUG_OPTS) $(VERSION_DEFINES) $(COV_OPTS)
all: test_suite
......@@ -36,30 +39,36 @@ include .depend
PCH=catch.hpp.gch
pch: $(PCH)
$(PCH):%.hpp.gch: %.hpp Makefile
$C $<
test_suite: $(OBJ) $(EXT_OBJ)
$C $(OBJ) $(EXT_OBJ) -o $@ $(LIBS)
test: test_suite
./$<
test: zerocounters test_suite
./test_suite
touch test
zerocounters:
lcov --zerocounters --directory .
test-coverage: zerocounters test
test-coverage: test
lcov --gcov-tool $(COV) --no-checksum --directory . --capture --output-file $(INFO_FILE)
lcov --remove $(INFO_FILE) "/usr*" -o $(INFO_FILE)
lcov --remove $(INFO_FILE) "/*" -o $(INFO_FILE)
lcov --remove $(INFO_FILE) "Core*" -o $(INFO_FILE)
lcov --remove $(INFO_FILE) "Jacobi" -o $(INFO_FILE)
lcov --remove $(INFO_FILE) "SVD" -o $(INFO_FILE)
lcov --remove $(INFO_FILE) "LU" -o $(INFO_FILE)
lcov --remove $(INFO_FILE) "QR" -o $(INFO_FILE)
lcov --remove $(INFO_FILE) "misc" -o $(INFO_FILE)
lcov --remove $(INFO_FILE) "plugins" -o $(INFO_FILE)
lcov --remove $(INFO_FILE) "catch.hpp" -o $(INFO_FILE)
genhtml --highlight --legend --output-directory TestCodeCoverage $(INFO_FILE)
.depend: $(SRC) Makefile
$C --depend $(SRC) > $@
g++-4.9 --std=c++11 $(INC) --depend $(SRC) > $@
$(OBJ):%.o: %.cc $(PCH)
$C -c $< -o $@
......
......@@ -185,10 +185,10 @@ TEST_CASE("hash.5", "check hashing of computed values")
context_key ck(new context_key_struc(*pop, *chr, std::vector<double>()));
value<multi_generation_observations>
mv1 = make_value<Sync|Disk>(population_marker_obs,
ck, value<int>{0});
as_value(ck), value<int>{0});
value<multi_generation_observations>
mv2 = make_value<Sync|Disk>(population_marker_obs,
ck, value<int>{1});
as_value(ck), value<int>{1});
auto tmp = mv1->LV;
tmp = mv2->LV;
/*std::cout << "mv1" << std::endl << (*mv1) << std::endl;*/
......@@ -198,7 +198,7 @@ TEST_CASE("hash.5", "check hashing of computed values")
CHECK(new_redux::md5(mv1) != new_redux::md5(mv2));
value<multi_generation_observations>
mv1bis = make_value<Disk>(population_marker_obs,
ck, value<int>{0});
as_value(ck), value<int>{0});
CHECK(mv1.hash() == mv1bis.hash());
CHECK(new_redux::md5(mv1, mv2) != new_redux::md5(mv1, mv1));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment