We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8798f0e + d128e1d commit 5a883e5Copy full SHA for 5a883e5
VERSION
@@ -1 +1 @@
1
-1.32.3
+1.32.4
src/eckit/maths/MatrixLapack.h
@@ -147,6 +147,12 @@ class Matrix : private eckit::NonCopyable {
147
}
148
149
150
+ void setZero() {
151
+ ASSERT(size() > 0);
152
+ ASSERT(data_);
153
+ ::memset(data_, 0, size() * sizeof(Scalar));
154
+ }
155
+
156
Matrix& operator=(const Matrix& other) {
157
resize(other.nr_, other.nc_);
158
std::memcpy(data_, other.data(), sizeof(Scalar) * nr_ * nc_);
@@ -462,6 +468,13 @@ class Matrix : private eckit::NonCopyable {
462
468
return m;
463
469
464
470
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
465
478
466
479
private:
467
480
0 commit comments