Skip to content

Commit

Permalink
Merge pull request #179 from JohanMabille/upgrade_xtensor
Browse files Browse the repository at this point in the history
Upgraded to xtensor 0.22.0
  • Loading branch information
JohanMabille committed Jan 20, 2021
2 parents 07ffb09 + bee05a1 commit 15a2cf2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ install:
- conda update -q conda
- conda info -a
- conda install cmake -c conda-forge
- conda install xtensor=0.21.4 -c conda-forge
- conda install xtensor=0.22.0 -c conda-forge
- conda install m2w64-openblas -c msys2
# Patch OpenBLASConfig.cmake
- ps: (Get-Content $Env:MINICONDA\Library\mingw-w64\lib\cmake\openblas\OpenBLASConfig.cmake).replace('mingw64', 'mingw-w64') | Set-Content $Env:MINICONDA\Library\mingw-w64\lib\cmake\openblas\OpenBLASConfig.cmake
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
conda install cmake==3.14.0 ^
mkl-devel ^
ninja ^
xtensor=0.21.4 ^
xtensor=0.22.0 ^
python=3.6
conda list
displayName: "Install conda packages"
Expand Down
12 changes: 2 additions & 10 deletions include/xtensor-blas/xblas_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,13 @@ namespace xt
return std::forward<T>(t);
}

namespace detail
{
constexpr layout_type layout_remove_any(const layout_type layout)
{
return layout == layout_type::any ? XTENSOR_DEFAULT_LAYOUT : layout;
}
}

template <layout_type L = layout_type::row_major, class T, class I = std::decay_t<T>>
inline auto view_eval(T&& t)
-> std::enable_if_t<(!has_data_interface<std::decay_t<T>>::value || I::static_layout != L)
&& detail::is_array<typename I::shape_type>::value,
xtensor<typename I::value_type,
std::tuple_size<typename I::shape_type>::value,
detail::layout_remove_any(L)>>
layout_remove_any(L)>>
{
return t;
}
Expand All @@ -58,7 +50,7 @@ namespace xt
inline auto view_eval(T&& t)
-> std::enable_if_t<(!has_data_interface<std::decay_t<T>>::value || I::static_layout != L) &&
!detail::is_array<typename I::shape_type>::value,
xarray<typename I::value_type, detail::layout_remove_any(L)>>
xarray<typename I::value_type, layout_remove_any(L)>>
{
return t;
}
Expand Down

0 comments on commit 15a2cf2

Please sign in to comment.