Skip to content

Commit 8910f4c

Browse files
authoredOct 20, 2021
Merge pull request #213 from JohanMabille/upgrade
Upgrade
2 parents db0815e + e351f7b commit 8910f4c

8 files changed

+39
-28
lines changed
 

‎.appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ install:
2121
- conda update -q conda
2222
- conda info -a
2323
- conda install cmake -c conda-forge
24-
- conda install xtensor=0.23.0 -c conda-forge
24+
- conda install xtensor=0.24.0 -c conda-forge
2525
- conda install m2w64-openblas -c msys2
2626
# Patch OpenBLASConfig.cmake
2727
- 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

‎.azure-pipelines/azure-pipelines-linux-clang.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ jobs:
22
- job: 'Linux_0'
33
strategy:
44
matrix:
5-
clang_4:
6-
llvm_version: '4.0'
7-
blas: 'OpenBLAS'
8-
clang_5:
9-
llvm_version: '5.0'
10-
blas: 'OpenBLAS'
115
clang_6:
126
llvm_version: '6.0'
137
blas: 'OpenBLAS'
@@ -24,7 +18,7 @@ jobs:
2418
llvm_version: '10'
2519
blas: 'OpenBLAS'
2620
pool:
27-
vmImage: ubuntu-16.04
21+
vmImage: ubuntu-18.04
2822
variables:
2923
CC: clang-$(llvm_version)
3024
CXX: clang++-$(llvm_version)

‎.azure-pipelines/azure-pipelines-linux-gcc.yml

+2-14
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@ jobs:
22
- job: 'Linux_1'
33
strategy:
44
matrix:
5-
gcc_4_OpenBLAS:
6-
gcc_version: '4.9'
7-
blas: 'OpenBLAS'
8-
gcc_5_OpenBLAS:
9-
gcc_version: '5'
10-
blas: 'OpenBLAS'
115
gcc_6_OpenBLAS:
12-
gcc_version: '5'
6+
gcc_version: '6'
137
blas: 'OpenBLAS'
148
gcc_6_bound_checks:
159
gcc_version: '6'
@@ -24,12 +18,6 @@ jobs:
2418
gcc_9_OpenBLAS:
2519
gcc_version: '9'
2620
blas: 'OpenBLAS'
27-
gcc_4_mkl:
28-
gcc_version: '4.9'
29-
blas: 'mkl'
30-
gcc_5_mkl:
31-
gcc_version: '5'
32-
blas: 'mkl'
3321
gcc_6_mkl:
3422
gcc_version: '6'
3523
blas: 'mkl'
@@ -43,7 +31,7 @@ jobs:
4331
gcc_version: '9'
4432
blas: 'mkl'
4533
pool:
46-
vmImage: ubuntu-16.04
34+
vmImage: ubuntu-18.04
4735
variables:
4836
CC: gcc-$(gcc_version)
4937
CXX: g++-$(gcc_version)

‎.azure-pipelines/azure-pipelines-win.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jobs:
2-
- job: 'build'
2+
- job: 'Windows clang'
33
pool:
44
vmImage: 'vs2017-win2016'
55
timeoutInMinutes: 360
@@ -36,7 +36,7 @@ jobs:
3636
conda install cmake==3.14.0 ^
3737
mkl-devel ^
3838
ninja ^
39-
xtensor=0.23.0 ^
39+
xtensor=0.24.0 ^
4040
python=3.6
4141
conda list
4242
displayName: "Install conda packages"

‎CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ message(STATUS "xtensor-blas v${${PROJECT_NAME}_VERSION}")
4444
# Dependencies
4545
# ============
4646

47-
set(xtensor_REQUIRED_VERSION 0.23.0)
47+
set(xtensor_REQUIRED_VERSION 0.24.0)
4848
if(TARGET xtensor)
4949
set(xtensor_VERSION ${XTENSOR_VERSION_MAJOR}.${XTENSOR_VERSION_MINOR}.${XTENSOR_VERSION_PATCH})
5050
# Note: This is not SEMVER compatible comparison

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ http://xtensor-blas.readthedocs.io/
6464

6565
| `xtensor-blas` | `xtensor` |
6666
|-----------------|-----------|
67-
| master | ^0.23.3 |
67+
| master | ^0.24.0 |
6868
| 0.19.2 | ^0.23.3 |
6969
| 0.19.1 | ^0.23.3 |
7070
| 0.19.0 | ^0.23.0 |

‎environment-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ channels:
33
- conda-forge
44
dependencies:
55
- cmake
6-
- xtensor=0.23.3
6+
- xtensor=0.24.0

‎include/xtensor-blas/xlinalg.hpp

+30-1
Original file line numberDiff line numberDiff line change
@@ -1326,6 +1326,35 @@ namespace linalg
13261326
return std::make_tuple(std::move(std::get<1>(result)), std::move(std::get<2>(result)), std::move(std::get<3>(result)));
13271327
}
13281328

1329+
namespace detail
1330+
{
1331+
template <bool>
1332+
struct conj_eval_impl
1333+
{
1334+
template <class E>
1335+
static const E& run(const E& e)
1336+
{
1337+
return e;
1338+
}
1339+
};
1340+
1341+
template <>
1342+
struct conj_eval_impl<true>
1343+
{
1344+
template <class E>
1345+
static auto run(const E& e)
1346+
{
1347+
return xt::conj(e);
1348+
}
1349+
};
1350+
1351+
template <class E>
1352+
inline decltype(auto) conj_eval(const E& e)
1353+
{
1354+
return conj_eval_impl<xtl::is_complex<typename E::value_type>::value>::run(e);
1355+
}
1356+
}
1357+
13291358
/**
13301359
* Calculate Moore-Rose pseudo inverse using LAPACK SVD.
13311360
*/
@@ -1335,7 +1364,7 @@ namespace linalg
13351364
using value_type = typename T::value_type;
13361365
const auto& dA = A.derived_cast();
13371366

1338-
xtensor<value_type, 2, layout_type::column_major> M = xt::conj(dA);
1367+
xtensor<value_type, 2, layout_type::column_major> M = detail::conj_eval(dA);
13391368

13401369
auto gesdd_res = svd(M, false, true);
13411370

0 commit comments

Comments
 (0)
Please sign in to comment.