1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-15 14:27:06 +01:00

Merge remote-tracking branch 'upstream/develop' into feature/wilsonmg

This commit is contained in:
Daniel Richtmann
2018-03-23 21:13:50 +01:00
37 changed files with 1129 additions and 551 deletions

View File

@ -55,5 +55,38 @@ LOGICAL_BINOP(&);
LOGICAL_BINOP(||);
LOGICAL_BINOP(&&);
template <class T>
strong_inline bool operator==(const iScalar<T> &t1, const iScalar<T> &t2)
{
return (t1._internal == t2._internal);
}
template <class T, int N>
strong_inline bool operator==(const iVector<T, N> &t1, const iVector<T, N> &t2)
{
bool res = true;
for (unsigned int i = 0; i < N; ++i)
{
res = (res && (t1._internal[i] == t2._internal[i]));
}
return res;
}
template <class T, int N>
strong_inline bool operator==(const iMatrix<T, N> &t1, const iMatrix<T, N> &t2)
{
bool res = true;
for (unsigned int i = 0; i < N; ++i)
for (unsigned int j = 0; j < N; ++j)
{
res = (res && (t1._internal[i][j] == t2._internal[i][j]));
}
return res;
}
}
#endif