28#include <Kokkos_Core.hpp>
38 Kokkos::View<double *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
40 Kokkos::View<double *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
42 Kokkos::View<double *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
44 Kokkos::View<int *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
47 using IdViewType = Kokkos::View<int *, Kokkos::HostSpace>;
73#ifdef ESPRESSO_ELECTROSTATICS
83#if defined(ESPRESSO_GAY_BERNE) or defined(ESPRESSO_DIPOLES)
86#ifdef ESPRESSO_DIPOLES
93#ifdef ESPRESSO_ELECTROSTATICS
103#if defined(ESPRESSO_GAY_BERNE) or defined(ESPRESSO_DIPOLES)
106#ifdef ESPRESSO_DIPOLES
112 template <
typename array_layout,
typename T, std::
size_t N>
115 std::size_t i)
const {
116 return std::span<T, N>(
const_cast<T *
>(&
view(i, 0)),
N);
119 template <
typename array_layout,
typename T, std::
size_t N>
122 std::size_t i)
const {
124 auto const data = result.
data();
125#if !defined(__NVCOMPILER) && !defined(__CUDACC__)
126#if defined(__clang__)
128#elif defined(__GNUC__) or defined(__GNUG__)
132 for (std::size_t
j = 0
ul;
j <
N;
j += 1ul) {
138 template <
typename array_layout,
typename T, std::
size_t N>
142#if !defined(__NVCOMPILER) && !defined(__CUDACC__)
143#if defined(__clang__)
145#elif defined(__GNUC__) or defined(__GNUG__)
149 for (std::size_t
j = 0
ul;
j <
N;
j += 1ul) {
DEVICE_QUALIFIER constexpr pointer data() noexcept
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
#define HOST_ONLY_QUALIFIER
void reset_any_exclusion()
DEVICE_QUALIFIER void set_has_exclusion(std::size_t i, bool value)
Kokkos::View< int *[3], Kokkos::LayoutRight, Kokkos::HostSpace > ImageViewType
Kokkos::View< double *, Kokkos::HostSpace > ChargeViewType
DEVICE_QUALIFIER std::span< T, N > get_span_at(Kokkos::View< T *[N], array_layout, Kokkos::HostSpace > const &view, std::size_t i) const
std::atomic< bool > any_exclusion
Kokkos::View< uint8_t *, Kokkos::HostSpace > FlagsViewType
Kokkos::View< double *, Kokkos::HostSpace > DipmViewType
Kokkos::View< double *[3], Kokkos::LayoutRight, Kokkos::HostSpace > DirectorViewType
DEVICE_QUALIFIER bool has_exclusion(std::size_t i) const
PositionViewType position
AoSoA_pack(std::size_t num_particles)
DEVICE_QUALIFIER void set_vector_at(Kokkos::View< T *[N], array_layout, Kokkos::HostSpace > &view, std::size_t i, Utils::Vector< T, N > const &value)
Kokkos::View< int *, Kokkos::HostSpace > TypeViewType
Kokkos::View< double *[3], Kokkos::LayoutRight, Kokkos::HostSpace > PositionViewType
DEVICE_QUALIFIER Utils::Vector< T, N > get_vector_at(Kokkos::View< T *[N], array_layout, Kokkos::HostSpace > const &view, std::size_t i) const
void mark_any_exclusion()
DirectorViewType director
Kokkos::View< double *[3], Kokkos::LayoutRight, Kokkos::HostSpace > VelocityViewType
HOST_ONLY_QUALIFIER void resize(std::size_t num_particles)
bool has_any_exclusion() const
Kokkos::View< double *, Kokkos::HostSpace > MassViewType
Kokkos::View< int *, Kokkos::HostSpace > IdViewType
VelocityViewType velocity