update boost on linux

This commit is contained in:
Bassem Girgis
2019-08-10 16:06:25 -05:00
parent 76ad52be58
commit 861b918727
5363 changed files with 483306 additions and 116507 deletions

View File

@@ -644,7 +644,7 @@ namespace boost { namespace numeric { namespace ublas {
template<class T>
T
ZeroElement (T) {
return T(0.0);
return static_cast<T> (0);
}
template<class T>
@@ -662,13 +662,7 @@ namespace boost { namespace numeric { namespace ublas {
template<class T>
T
OneElement (T) {
return T(0.0);
}
template<class T>
vector<T>
OneElement (vector<T>) {
return zero_vector<T> ();
return static_cast<T> (1);
}
template<class T>
@@ -677,110 +671,6 @@ namespace boost { namespace numeric { namespace ublas {
return identity_matrix<T> ();
}
// template<>
// float
// ZeroElement (float) {
// return 0.f;
// }
// template<>
// double
// ZeroElement (double) {
// return 0.;
// }
// template<>
// vector<float>
// ZeroElement (vector<float>) {
// return zero_vector<float> ();
// }
// template<>
// vector<double>
// ZeroElement (vector<double>) {
// return zero_vector<double> ();
// }
// template<>
// matrix<float>
// ZeroElement (matrix<float>) {
// return zero_matrix<float> ();
// }
// template<>
// matrix<double>
// ZeroElement (matrix<double>) {
// return zero_matrix<double> ();
// }
// template<>
// std::complex<float>
// ZeroElement (std::complex<float>) {
// return std::complex<float> (0.f);
// }
// template<>
// std::complex<double>
// ZeroElement (std::complex<double>) {
// return std::complex<double> (0.);
// }
// template<>
// vector<std::complex<float> >
// ZeroElement (vector<std::complex<float> >) {
// return zero_vector<std::complex<float> > ();
// }
// template<>
// vector<std::complex<double> >
// ZeroElement (vector<std::complex<double> >) {
// return zero_vector<std::complex<double> > ();
// }
// template<>
// matrix<std::complex<float> >
// ZeroElement (matrix<std::complex<float> >) {
// return zero_matrix<std::complex<float> > ();
// }
// template<>
// matrix<std::complex<double> >
// ZeroElement (matrix<std::complex<double> >) {
// return zero_matrix<std::complex<double> > ();
// }
// template<class T>
// T
// OneElement (T);
// template<>
// float
// OneElement (float) {
// return 1.f;
// }
// template<>
// double
// OneElement (double) {
// return 1.;
// }
// template<>
// matrix<float>
// OneElement (matrix<float>) {
// return identity_matrix<float> ();
// }
// template<>
// matrix<double>
// OneElement (matrix<double>) {
// return identity_matrix<double> ();
// }
// template<>
// std::complex<float>
// OneElement (std::complex<float>) {
// return std::complex<float> (1.f);
// }
// template<>
// std::complex<double>
// OneElement (std::complex<double>) {
// return std::complex<double> (1.);
// }
// template<>
// matrix<std::complex<float> >
// OneElement (matrix<std::complex<float> >) {
// return identity_matrix<std::complex<float> > ();
// }
// template<>
// matrix<std::complex<double> >
// OneElement (matrix<std::complex<double> >) {
// return identity_matrix<std::complex<double> > ();
// }
template<class E1, class E2>
bool

View File

@@ -30,7 +30,7 @@ namespace detail {
template<class E1, class E2, class S>
BOOST_UBLAS_INLINE
bool equals (const matrix_expression<E1> &e1, const matrix_expression<E2> &e2, S epsilon, S min_norm) {
return norm_inf (e1 - e2) < epsilon *
return norm_inf (e1 - e2) <= epsilon *
std::max<S> (std::max<S> (norm_inf (e1), norm_inf (e2)), min_norm);
}
@@ -74,7 +74,7 @@ namespace detail {
#endif
if (it2 != it2_end && it2e != it2e_end) {
size_type it2_index = it2.index2 (), it2e_index = it2e.index2 ();
while (true) {
for (;;) {
difference_type compare2 = it2_index - it2e_index;
if (compare2 == 0) {
++ it2, ++ it2e;
@@ -177,7 +177,7 @@ namespace detail {
#endif
if (it1 != it1_end && it1e != it1e_end) {
size_type it1_index = it1.index1 (), it1e_index = it1e.index1 ();
while (true) {
for (;;) {
difference_type compare2 = it1_index - it1e_index;
if (compare2 == 0) {
++ it1, ++ it1e;
@@ -670,7 +670,15 @@ namespace detail {
size1 = (std::min) (- diff1, it1_size);
if (size1 > 0) {
it1_size -= size1;
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (-- size1 >= 0) { // zeroing
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
typename M::iterator2 it2 (it1.begin ());
@@ -719,7 +727,15 @@ namespace detail {
size2 = (std::min) (- diff2, it2_size);
if (size2 > 0) {
it2_size -= size2;
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (-- size2 >= 0) // zeroing
functor_type::apply (*it2, expr_value_type/*zero*/()), ++ it2;
} else {
@@ -734,7 +750,15 @@ namespace detail {
while (-- size2 >= 0)
functor_type::apply (*it2, *it2e), ++ it2, ++ it2e;
size2 = it2_size;
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (-- size2 >= 0) // zeroing
functor_type::apply (*it2, expr_value_type/*zero*/()), ++ it2;
} else {
@@ -743,7 +767,15 @@ namespace detail {
++ it1, ++ it1e;
}
size1 = it1_size;
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (-- size1 >= 0) { // zeroing
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
typename M::iterator2 it2 (it1.begin ());
@@ -802,7 +834,15 @@ namespace detail {
size2 = (std::min) (- diff2, it2_size);
if (size2 > 0) {
it2_size -= size2;
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (-- size2 >= 0) { // zeroing
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
typename M::iterator1 it1 (it2.begin ());
@@ -851,7 +891,15 @@ namespace detail {
size1 = (std::min) (- diff1, it1_size);
if (size1 > 0) {
it1_size -= size1;
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (-- size1 >= 0) // zeroing
functor_type::apply (*it1, expr_value_type/*zero*/()), ++ it1;
} else {
@@ -866,7 +914,16 @@ namespace detail {
while (-- size1 >= 0)
functor_type::apply (*it1, *it1e), ++ it1, ++ it1e;
size1 = it1_size;
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (-- size1 >= 0) // zeroing
functor_type::apply (*it1, expr_value_type/*zero*/()), ++ it1;
} else {
@@ -875,7 +932,15 @@ namespace detail {
++ it2, ++ it2e;
}
size2 = it2_size;
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (-- size2 >= 0) { // zeroing
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
typename M::iterator1 it1 (it2.begin ());
@@ -903,7 +968,16 @@ namespace detail {
void matrix_assign (M &m, const matrix_expression<E> &e, sparse_tag, row_major_tag) {
typedef F<typename M::iterator2::reference, typename E::value_type> functor_type;
// R unnecessary, make_conformant not required
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
BOOST_STATIC_ASSERT ((!functor_type::computed));
#ifdef _MSC_VER
#pragma warning(pop)
#endif
BOOST_UBLAS_CHECK (m.size1 () == e ().size1 (), bad_size ());
BOOST_UBLAS_CHECK (m.size2 () == e ().size2 (), bad_size ());
typedef typename M::value_type value_type;
@@ -935,7 +1009,16 @@ namespace detail {
void matrix_assign (M &m, const matrix_expression<E> &e, sparse_tag, column_major_tag) {
typedef F<typename M::iterator1::reference, typename E::value_type> functor_type;
// R unnecessary, make_conformant not required
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
BOOST_STATIC_ASSERT ((!functor_type::computed));
#ifdef _MSC_VER
#pragma warning(pop)
#endif
BOOST_UBLAS_CHECK (m.size1 () == e ().size1 (), bad_size ());
BOOST_UBLAS_CHECK (m.size2 () == e ().size2 (), bad_size ());
typedef typename M::value_type value_type;
@@ -1002,7 +1085,7 @@ namespace detail {
#endif
if (it2 != it2_end && it2e != it2e_end) {
size_type it2_index = it2.index2 (), it2e_index = it2e.index2 ();
while (true) {
for (;;) {
difference_type compare2 = it2_index - it2e_index;
if (compare2 == 0) {
functor_type::apply (*it2, *it2e);
@@ -1013,7 +1096,15 @@ namespace detail {
} else
break;
} else if (compare2 < 0) {
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
functor_type::apply (*it2, expr_value_type/*zero*/());
++ it2;
} else
@@ -1031,7 +1122,15 @@ namespace detail {
}
}
}
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (it2 != it2_end) { // zeroing
functor_type::apply (*it2, expr_value_type/*zero*/());
++ it2;
@@ -1041,7 +1140,15 @@ namespace detail {
}
++ it1, ++ it1e;
} else if (compare < 0) {
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
typename M::iterator2 it2 (it1.begin ());
typename M::iterator2 it2_end (it1.end ());
@@ -1061,7 +1168,15 @@ namespace detail {
increment (it1e, it1e_end, compare);
}
}
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (it1 != it1_end) {
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
typename M::iterator2 it2 (it1.begin ());
@@ -1125,7 +1240,7 @@ namespace detail {
#endif
if (it1 != it1_end && it1e != it1e_end) {
size_type it1_index = it1.index1 (), it1e_index = it1e.index1 ();
while (true) {
for (;;) {
difference_type compare2 = it1_index - it1e_index;
if (compare2 == 0) {
functor_type::apply (*it1, *it1e);
@@ -1136,7 +1251,15 @@ namespace detail {
} else
break;
} else if (compare2 < 0) {
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
functor_type::apply (*it1, expr_value_type/*zero*/()); // zeroing
++ it1;
} else
@@ -1154,7 +1277,15 @@ namespace detail {
}
}
}
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (it1 != it1_end) { // zeroing
functor_type::apply (*it1, expr_value_type/*zero*/());
++ it1;
@@ -1164,7 +1295,15 @@ namespace detail {
}
++ it2, ++ it2e;
} else if (compare < 0) {
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
typename M::iterator1 it1 (it2.begin ());
typename M::iterator1 it1_end (it2.end ());
@@ -1184,7 +1323,15 @@ namespace detail {
increment (it2e, it2e_end, compare);
}
}
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (it2 != it2_end) {
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
typename M::iterator1 it1 (it2.begin ());
@@ -1390,7 +1537,7 @@ namespace detail {
#endif
if (it2 != it2_end && it2e != it2e_end) {
size_type it2_index = it2.index2 (), it2e_index = it2e.index2 ();
while (true) {
for (;;) {
difference_type compare2 = it2_index - it2e_index;
if (compare2 == 0) {
functor_type::apply (*it2, *it2e);
@@ -1515,7 +1662,7 @@ namespace detail {
#endif
if (it1 != it1_end && it1e != it1e_end) {
size_type it1_index = it1.index1 (), it1e_index = it1e.index1 ();
while (true) {
for (;;) {
difference_type compare2 = it1_index - it1e_index;
if (compare2 == 0) {
functor_type::apply (*it1, *it1e);

View File

@@ -126,13 +126,13 @@ struct error_cant_deduce_type {};
test(unsigned long const&);
template <typename X, typename Y>
typename disable_if<
typename boost::disable_if<
is_basic<X>, x_value_type
>::type
test(X const&);
template <typename X, typename Y>
typename disable_if<
typename boost::disable_if<
mpl::or_<
is_basic<Y>
, is_same<Y, asymmetric>

View File

@@ -59,7 +59,7 @@ namespace detail {
typename E::const_iterator ite_end (e ().end ());
if (it != it_end && ite != ite_end) {
size_type it_index = it.index (), ite_index = ite.index ();
while (true) {
for (;;) {
difference_type compare = it_index - ite_index;
if (compare == 0) {
++ it, ++ ite;
@@ -316,7 +316,15 @@ namespace detail {
difference_type size ((std::min) (difference_type (ite.index () - it.index ()), it_size));
if (size > 0) {
it_size -= size;
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (-- size >= 0) // zeroing
functor_type::apply (*it, value_type/*zero*/()), ++ it;
} else {
@@ -330,7 +338,15 @@ namespace detail {
while (-- size >= 0)
functor_type::apply (*it, *ite), ++ it, ++ ite;
size = it_size;
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (-- size >= 0) // zeroing
functor_type::apply (*it, value_type/*zero*/()), ++ it;
} else {
@@ -348,7 +364,15 @@ namespace detail {
void vector_assign (V &v, const vector_expression<E> &e, sparse_tag) {
BOOST_UBLAS_CHECK (v.size () == e ().size (), bad_size ());
typedef F<typename V::iterator::reference, typename E::value_type> functor_type;
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
BOOST_STATIC_ASSERT ((!functor_type::computed));
#ifdef _MSC_VER
#pragma warning(pop)
#endif
typedef typename V::value_type value_type;
#if BOOST_UBLAS_TYPE_CHECK
vector<value_type> cv (v.size ());
@@ -393,7 +417,7 @@ namespace detail {
typename E::const_iterator ite_end (e ().end ());
if (it != it_end && ite != ite_end) {
size_type it_index = it.index (), ite_index = ite.index ();
while (true) {
for (;;) {
difference_type compare = it_index - ite_index;
if (compare == 0) {
functor_type::apply (*it, *ite);
@@ -404,7 +428,15 @@ namespace detail {
} else
break;
} else if (compare < 0) {
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
functor_type::apply (*it, value_type/*zero*/());
++ it;
} else
@@ -422,8 +454,15 @@ namespace detail {
}
}
}
//Disabled warning C4127 because the conditional expression is constant
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4127)
#endif
if (!functor_type::computed) {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
while (it != it_end) { // zeroing
functor_type::apply (*it, value_type/*zero*/());
++ it;
@@ -524,7 +563,7 @@ namespace detail {
typename E::iterator ite_end (e ().end ());
if (it != it_end && ite != ite_end) {
size_type it_index = it.index (), ite_index = ite.index ();
while (true) {
for (;;) {
difference_type compare = it_index - ite_index;
if (compare == 0) {
functor_type::apply (*it, *ite);