Skip to content

Commit

Permalink
Merge pull request #1292 from STEllAR-GROUP/fix_hpxh5
Browse files Browse the repository at this point in the history
Apply HPX and HighFive header updates
  • Loading branch information
hkaiser authored Oct 31, 2020
2 parents 92a583d + 3fd21f5 commit 4f8437f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 45 deletions.
63 changes: 20 additions & 43 deletions phylanx/util/detail/blaze-highfive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,56 +21,33 @@ namespace HighFive { namespace details {

///////////////////////////////////////////////////////////////////////////////
template <typename T, bool TF>
struct array_dims<blaze::DynamicVector<T, TF>>
struct inspector<blaze::DynamicVector<T, TF>>
{
static const std::size_t value = 1 + array_dims<T>::value;
static const std::size_t recursive_ndim = 1 + inspector<T>::recursive_ndim;
typedef typename inspector<T>::base_type base_type;
};

template <typename T, blaze::AlignmentFlag AF, blaze::PaddingFlag PF, bool TF,
typename RT>
struct array_dims<blaze::CustomVector<T, AF, PF, TF, RT>>
struct inspector<blaze::CustomVector<T, AF, PF, TF, RT>>
{
static const std::size_t value = 1 + array_dims<T>::value;
static const std::size_t recursive_ndim = 1 + inspector<T>::recursive_ndim;
typedef typename inspector<T>::base_type base_type;
};

template <typename T, bool SO>
struct array_dims<blaze::DynamicMatrix<T, SO>>
struct inspector<blaze::DynamicMatrix<T, SO>>
{
static const std::size_t value = 2 + array_dims<T>::value;
static const std::size_t recursive_ndim = 2 + inspector<T>::recursive_ndim;
typedef typename inspector<T>::base_type base_type;
};

template <typename T, blaze::AlignmentFlag AF, blaze::PaddingFlag PF, bool SO,
typename RT>
struct array_dims<blaze::CustomMatrix<T, AF, PF, SO, RT>>
struct inspector<blaze::CustomMatrix<T, AF, PF, SO, RT>>
{
static const std::size_t value = 2 + array_dims<T>::value;
};

///////////////////////////////////////////////////////////////////////////////
template <typename T, bool TF>
struct type_of_array<blaze::DynamicVector<T, TF>>
{
typedef typename type_of_array<T>::type type;
};

template <typename T, blaze::AlignmentFlag AF, blaze::PaddingFlag PF, bool TF,
typename RT>
struct type_of_array<blaze::CustomVector<T, AF, PF, TF, RT>>
{
typedef typename type_of_array<T>::type type;
};

template <typename T, bool SO>
struct type_of_array<blaze::DynamicMatrix<T, SO>>
{
typedef typename type_of_array<T>::type type;
};

template <typename T, blaze::AlignmentFlag AF, blaze::PaddingFlag PF, bool SO,
typename RT>
struct type_of_array<blaze::CustomMatrix<T, AF, PF, SO, RT>>
{
typedef typename type_of_array<T>::type type;
static const std::size_t recursive_ndim = 2 + inspector<T>::recursive_ndim;
typedef typename inspector<T>::base_type base_type;
};

///////////////////////////////////////////////////////////////////////////////
Expand All @@ -85,7 +62,7 @@ struct data_converter<blaze::DynamicVector<T, TF>, void>
assert(_dims.size() == 1);
}

inline typename type_of_array<T>::type* transform_read(Vector& vector) const
inline typename inspector<T>::type* transform_read(Vector& vector) const
{
if (_dims[0] != vector.size())
{
Expand All @@ -94,7 +71,7 @@ struct data_converter<blaze::DynamicVector<T, TF>, void>
return vector.data();
}

inline typename type_of_array<T>::type const* transform_write(
inline typename inspector<T>::type const* transform_write(
Vector const& vector) const noexcept
{
return vector.data();
Expand All @@ -120,12 +97,12 @@ struct data_converter<blaze::CustomVector<T, AF, PF, TF, RT>, void>
assert(_dims.size() == 1);
}

inline typename type_of_array<T>::type* transform_read(Vector& vector) const
inline typename inspector<T>::type* transform_read(Vector& vector) const
{
throw std::runtime_error("can't read into blaze::CustomVector");
}

inline typename type_of_array<T>::type const* transform_write(
inline typename inspector<T>::type const* transform_write(
Vector const& vector) const noexcept
{
return vector.data();
Expand All @@ -150,7 +127,7 @@ struct data_converter<blaze::DynamicMatrix<T, SO>, void>
assert(_dims.size() == 2);
}

inline typename type_of_array<T>::type* transform_read(Matrix& matrix) const
inline typename inspector<T>::type* transform_read(Matrix& matrix) const
{
if (_dims[0] != matrix.rows() || _dims[1] != matrix.columns())
{
Expand All @@ -159,7 +136,7 @@ struct data_converter<blaze::DynamicMatrix<T, SO>, void>
return matrix.data();
}

inline typename type_of_array<T>::type const* transform_write(
inline typename inspector<T>::type const* transform_write(
Matrix const& matrix) const noexcept
{
return matrix.data();
Expand All @@ -185,13 +162,13 @@ struct data_converter<blaze::CustomMatrix<T, AF, PF, SO, RT>, void>
assert(_dims.size() == 2);
}

inline typename type_of_array<T>::type* transform_read(
inline typename inspector<T>::type* transform_read(
Matrix& matrix) const
{
throw std::runtime_error("can't read into blaze::CustomMatrix");
}

inline typename type_of_array<T>::type const* transform_write(
inline typename inspector<T>::type const* transform_write(
Matrix const& matrix) const noexcept
{
return matrix.data();
Expand Down
1 change: 0 additions & 1 deletion src/execution_tree/primitives/find_all_localities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <hpx/include/naming.hpp>
#include <hpx/include/util.hpp>
#include <hpx/errors/throw_exception.hpp>
#include <hpx/runtime/naming/name.hpp>

#include <cstddef>
#include <cstdint>
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/load_plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace phylanx { namespace plugin
using tokenizer = boost::tokenizer<boost::char_separator<char> >;
boost::char_separator<char> sep(HPX_INI_PATH_DELIMITER);
tokenizer tokens(component_path, sep);
hpx::filesystem::error_code fsec;
hpx::error_code fsec;
for (tokenizer::iterator it = tokens.begin(); it != tokens.end();
++it)
{
Expand Down

0 comments on commit 4f8437f

Please sign in to comment.