Skip to content
Snippets Groups Projects
Commit 78d3d801 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Added == and != operators

parent 0ab7a5bd
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,21 @@ public:
return N;
}
KOKKOS_INLINE_FUNCTION
bool operator==(const TinyVector& v) const
{
for (size_t i=0; i<N; ++i) {
if (m_values[i] != v.m_values[i]) return false;
}
return true;
}
KOKKOS_INLINE_FUNCTION
bool operator!=(const TinyVector& v) const
{
return not this->operator==(v);
}
KOKKOS_INLINE_FUNCTION
T operator,(const TinyVector& v) const
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment