28#include <Kokkos_Core.hpp>
35#if defined(__GNUG__) or defined(__clang__)
36#define ESPRESSO_ATTR_ALWAYS_INLINE [[gnu::always_inline]]
38#define ESPRESSO_ATTR_ALWAYS_INLINE
43 Kokkos::View<double *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
45 Kokkos::View<double *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
47 Kokkos::View<double *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
49 Kokkos::View<int *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
52 using IdViewType = Kokkos::View<int *, Kokkos::HostSpace>;
78#ifdef ESPRESSO_ELECTROSTATICS
88#if defined(ESPRESSO_GAY_BERNE) or defined(ESPRESSO_DIPOLES)
91#ifdef ESPRESSO_DIPOLES
98#ifdef ESPRESSO_ELECTROSTATICS
108#if defined(ESPRESSO_GAY_BERNE) or defined(ESPRESSO_DIPOLES)
111#ifdef ESPRESSO_DIPOLES
117 template <
typename array_layout,
typename T, std::
size_t N>
120 std::size_t i)
const {
121 return std::span<T, N>(
const_cast<T *
>(&
view(i, 0)),
N);
124 template <
typename array_layout,
typename T, std::
size_t N>
127 std::size_t i)
const {
129 auto const data = result.
data();
130#if !defined(__NVCOMPILER) && !defined(__CUDACC__)
131#if defined(__clang__)
133#elif defined(__GNUC__) or defined(__GNUG__)
137 for (std::size_t
j = 0
ul;
j <
N;
j += 1ul) {
143 template <
typename array_layout,
typename T, std::
size_t N>
147#if !defined(__NVCOMPILER) && !defined(__CUDACC__)
148#if defined(__clang__)
150#elif defined(__GNUC__) or defined(__GNUG__)
154 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
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
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
DirectorViewType director
Kokkos::View< double *[3], Kokkos::LayoutRight, Kokkos::HostSpace > VelocityViewType
HOST_ONLY_QUALIFIER void resize(std::size_t num_particles)
Kokkos::View< double *, Kokkos::HostSpace > MassViewType
Kokkos::View< int *, Kokkos::HostSpace > IdViewType
VelocityViewType velocity