Skip to content

File hasdoweneedghosts.h

File List > algebra > helpers > hasdoweneedghosts.h

Go to the documentation of this file

#ifndef TEMPLAT_LATTICE_ALGEBRA_HELPERS_HASDOWENEEDGHOSTS_H
#define TEMPLAT_LATTICE_ALGEBRA_HELPERS_HASDOWENEEDGHOSTS_H

/* This file is part of TempLat, available at https://cosmolattice.github.io/templat .
   Copyright 2021-2026 The TempLat authors, see AUTHORS.md.
   Released under the MIT license, see LICENSE.md. */

// File info: Main contributor(s): Adrien Florio, Year: 2019

#include <type_traits>

#include "TempLat/util/rangeiteration/tag.h"

namespace TempLat
{
  template <class T>
  concept HasDoWeNeedGhostsMethod = requires(std::decay_t<T> t) { t.doWeNeedGhosts(); };

  template <int N, class T>
  concept HasDoWeNeedGhostsMethodIndexed = requires(std::decay_t<T> t, Tag<N> tag) { t.doWeNeedGhosts(tag); };

  template <class T>
  concept HasDoWeNeedGhostsMethodIndexedDyn = requires(std::decay_t<T> t, device::Idx idx) { t.doWeNeedGhosts(idx); };

} // namespace TempLat

#endif