Skip to content

Commit 5a883e5

Browse files
committed
Merge branch 'hotfix/1.32.4'
2 parents 8798f0e + d128e1d commit 5a883e5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.32.3
1+
1.32.4

src/eckit/maths/MatrixLapack.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ class Matrix : private eckit::NonCopyable {
147147
}
148148
}
149149

150+
void setZero() {
151+
ASSERT(size() > 0);
152+
ASSERT(data_);
153+
::memset(data_, 0, size() * sizeof(Scalar));
154+
}
155+
150156
Matrix& operator=(const Matrix& other) {
151157
resize(other.nr_, other.nc_);
152158
std::memcpy(data_, other.data(), sizeof(Scalar) * nr_ * nc_);
@@ -462,6 +468,13 @@ class Matrix : private eckit::NonCopyable {
462468
return m;
463469
}
464470

471+
// Matrix Scalar divide
472+
Matrix operator/(const Scalar& s) const {
473+
ASSERT(s != 0.0);
474+
Matrix m(*this);
475+
m /= s;
476+
return m;
477+
}
465478

466479
private:
467480

0 commit comments

Comments
 (0)