Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/TiledArray/dense_shape.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ class DenseShape {
return false;
}

/// Check that a tile is zero

/// \tparam Integer an integer type
/// \param i the index
/// \return false
template <typename Integer>
std::enable_if_t<std::is_integral_v<Integer>, bool> is_zero(
const std::initializer_list<Integer>& i) const {
return false;
}

/// Check density

/// \return true
Expand Down
11 changes: 11 additions & 0 deletions src/TiledArray/sparse_shape.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,17 @@ class SparseShape {
return tile_norms_[i] < my_threshold_;
}

/// Check that a tile is zero

/// \tparam Integer an integer type
/// \param i the index
/// \return true if tile at position \p i is zero
template <typename Integer>
std::enable_if_t<std::is_integral_v<Integer>, bool> is_zero(
const std::initializer_list<Integer>& i) const {
return this->is_zero<std::initializer_list<Integer>>(i);
}

/// Check density

/// \return true
Expand Down