Loading...
Searching...
No Matches
MatrixComparison.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) gpridge developers
3#pragma once
4
5namespace gpr::detail {
6
8template <typename Lhs, typename Rhs>
9inline bool matrixExactlyEqual(const Lhs& lhs, const Rhs& rhs)
10{
11 if (lhs.rows() != rhs.rows() || lhs.cols() != rhs.cols()) return false;
12 if (lhs.size() == 0) return true;
13 return (lhs.array() == rhs.array()).all();
14}
15
16} // namespace gpr::detail