mirror of
https://github.com/marian-nmt/marian.git
synced 2024-11-30 21:39:52 +03:00
Add bool operator to mblas::matrix
This commit is contained in:
parent
d3615d2481
commit
697c1a6bb1
@ -132,6 +132,11 @@ class TMatrix : public BaseMatrix {
|
||||
return cols_ * rows_;
|
||||
}
|
||||
|
||||
|
||||
operator bool() const {
|
||||
return (int)size() != 0;
|
||||
}
|
||||
|
||||
private:
|
||||
size_t rows_;
|
||||
size_t cols_;
|
||||
|
Loading…
Reference in New Issue
Block a user