Skip to content

Commit

Permalink
Add equality comparison for SparseShape<T>.
Browse files Browse the repository at this point in the history
  • Loading branch information
bimalgaudel committed Nov 23, 2023
1 parent c694053 commit 29b5dba
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/TiledArray/sparse_shape.h
Original file line number Diff line number Diff line change
Expand Up @@ -1742,6 +1742,17 @@ bool is_replicated(World& world, const SparseShape<T>& shape) {
return result;
}

template <typename T>
constexpr inline bool operator==(const SparseShape<T>& a,
const SparseShape<T>& b) {
return true;
}
template <typename T>
constexpr inline bool operator!=(const SparseShape<T>& a,
const SparseShape<T>& b) {
return !(a == b);
}

#ifndef TILEDARRAY_HEADER_ONLY

extern template class SparseShape<float>;
Expand Down

0 comments on commit 29b5dba

Please sign in to comment.