Skip to content

Commit 07ffb09

Browse files
authored
Merge pull request #172 from luk036/luk036/gitpod-setup
fix for the issue #171
2 parents 8afdee5 + 1aeb382 commit 07ffb09

File tree

3 files changed

+49
-49
lines changed

3 files changed

+49
-49
lines changed

include/xtensor-blas/xblas_utils.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#include "xtensor/xutils.hpp"
2020

2121
#ifndef DEFAULT_LEADING_STRIDE_BEHAVIOR
22-
#define DEFAULT_LEADING_STRIDE_BEHAVIOR throw std::runtime_error("No valid layout chosen.");
22+
#define DEFAULT_LEADING_STRIDE_BEHAVIOR XTENSOR_THROW(std::runtime_error, "No valid layout chosen.");
2323
#endif
2424

2525
#ifndef DEFAULT_STORAGE_ORDER_BEHAVIOR
26-
#define DEFAULT_STORAGE_ORDER_BEHAVIOR throw std::runtime_error("Cannot handle layout_type of e.");
26+
#define DEFAULT_STORAGE_ORDER_BEHAVIOR XTENSOR_THROW(std::runtime_error, "Cannot handle layout_type of e.");
2727
#endif
2828

2929
namespace xt
@@ -203,7 +203,7 @@ namespace xt
203203
auto& dt = t.derived_cast();
204204
if (dt.shape()[dt.dimension() - 1] != dt.shape()[dt.dimension() - 2])
205205
{
206-
throw std::runtime_error("Last 2 dimensions of the array must be square.");
206+
XTENSOR_THROW(std::runtime_error, "Last 2 dimensions of the array must be square.");
207207
}
208208
}
209209
}

include/xtensor-blas/xlapack.hpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ namespace lapack
105105

106106
if (info != 0)
107107
{
108-
throw std::runtime_error("Could not find workspace size for orgqr.");
108+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for orgqr.");
109109
}
110110

111111
work.resize(static_cast<std::size_t>(work[0]));
@@ -152,7 +152,7 @@ namespace lapack
152152

153153
if (info != 0)
154154
{
155-
throw std::runtime_error("Could not find workspace size for ungqr.");
155+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for ungqr.");
156156
}
157157

158158
work.resize(static_cast<std::size_t>(std::real(work[0])));
@@ -195,7 +195,7 @@ namespace lapack
195195

196196
if (info != 0)
197197
{
198-
throw std::runtime_error("Could not find workspace size for geqrf.");
198+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for geqrf.");
199199
}
200200

201201
work.resize(static_cast<std::size_t>(std::real(work[0])));
@@ -299,7 +299,7 @@ namespace lapack
299299

300300
if (info != 0)
301301
{
302-
throw std::runtime_error("Could not find workspace size for real gesdd.");
302+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for real gesdd.");
303303
}
304304

305305
work.resize(static_cast<std::size_t>(work[0]));
@@ -386,7 +386,7 @@ namespace lapack
386386

387387
if (info != 0)
388388
{
389-
throw std::runtime_error("Could not find workspace size for complex gesdd.");
389+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for complex gesdd.");
390390
}
391391
work.resize(static_cast<std::size_t>(std::real(work[0])));
392392

@@ -503,7 +503,7 @@ namespace lapack
503503

504504
if (info > 0)
505505
{
506-
throw std::runtime_error("Could not find workspace size for getri.");
506+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for getri.");
507507
}
508508

509509
work.resize(static_cast<std::size_t>(std::real(work[0])));
@@ -553,7 +553,7 @@ namespace lapack
553553

554554
if (info != 0)
555555
{
556-
throw std::runtime_error("Could not find workspace size for geev.");
556+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for geev.");
557557
}
558558

559559
work.resize(static_cast<std::size_t>(work[0]));
@@ -608,7 +608,7 @@ namespace lapack
608608

609609
if (info != 0)
610610
{
611-
throw std::runtime_error("Could not find workspace size for syevd.");
611+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for syevd.");
612612
}
613613

614614
work.resize(std::size_t(work[0]));
@@ -668,7 +668,7 @@ namespace lapack
668668

669669
if (info != 0)
670670
{
671-
throw std::runtime_error("Could not find workspace size for sygvd.");
671+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for sygvd.");
672672
}
673673

674674
work.resize(std::size_t(work[0]));
@@ -729,7 +729,7 @@ namespace lapack
729729

730730
if (info != 0)
731731
{
732-
throw std::runtime_error("Could not find workspace size for geev.");
732+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for geev.");
733733
}
734734

735735
work.resize(std::size_t(std::real(work[0])));
@@ -784,7 +784,7 @@ namespace lapack
784784

785785
if (info != 0)
786786
{
787-
throw std::runtime_error("Could not find workspace size for heevd.");
787+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for heevd.");
788788
}
789789

790790
work.resize(std::size_t(std::real(work[0])));
@@ -843,7 +843,7 @@ namespace lapack
843843

844844
if (info != 0)
845845
{
846-
throw std::runtime_error("Could not find workspace size for gelsd.");
846+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for gelsd.");
847847
}
848848

849849
work.resize(std::size_t(work[0]));
@@ -900,7 +900,7 @@ namespace lapack
900900

901901
if (info != 0)
902902
{
903-
throw std::runtime_error("Could not find workspace size for gelsd.");
903+
XTENSOR_THROW(std::runtime_error, "Could not find workspace size for gelsd.");
904904
}
905905

906906
work.resize(std::size_t(std::real(work[0])));

0 commit comments

Comments
 (0)