26#include <Kokkos_Core.hpp>
33#if defined(__GNUG__) or defined(__clang__)
34#define ESPRESSO_ATTR_ALWAYS_INLINE [[gnu::always_inline]]
36#define ESPRESSO_ATTR_ALWAYS_INLINE
41 Kokkos::View<double *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
43 Kokkos::View<double *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
45 Kokkos::View<double *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
47 Kokkos::View<int *[3], Kokkos::LayoutRight, Kokkos::HostSpace>;
50 using IdViewType = Kokkos::View<int *, Kokkos::HostSpace>;
75#ifdef ESPRESSO_ELECTROSTATICS
85#if defined(ESPRESSO_GAY_BERNE) or defined(ESPRESSO_DIPOLES)
88#ifdef ESPRESSO_DIPOLES
95#ifdef ESPRESSO_ELECTROSTATICS
105#if defined(ESPRESSO_GAY_BERNE) or defined(ESPRESSO_DIPOLES)
108#ifdef ESPRESSO_DIPOLES
114 template <
typename array_layout,
typename T, std::
size_t N>
117 std::size_t i)
const {
118 return std::span<T, N>(
const_cast<T *
>(&
view(i, 0)),
N);
121 template <
typename array_layout,
typename T, std::
size_t N>
124 std::size_t i)
const {
126 auto const data = result.
data();
127#if !defined(__NVCOMPILER)
128#if (defined(__GNUC__) or defined(__GNUG__)) && !defined(__clang__)
134 for (std::size_t
j = 0
ul;
j <
N;
j += 1ul) {
140 template <
typename array_layout,
typename T, std::
size_t N>
144#if !defined(__NVCOMPILER)
145#if (defined(__GNUC__) or defined(__GNUG__)) && !defined(__clang__)
151 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.
Kokkos::View< int *[3], Kokkos::LayoutRight, Kokkos::HostSpace > ImageViewType
Kokkos::View< double *, Kokkos::HostSpace > ChargeViewType
bool has_exclusion(std::size_t i) const
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
void set_vector_at(Kokkos::View< T *[N], array_layout, Kokkos::HostSpace > &view, std::size_t i, Utils::Vector< T, N > const &value)
PositionViewType position
AoSoA_pack(std::size_t num_particles)
Kokkos::View< int *, Kokkos::HostSpace > TypeViewType
Kokkos::View< double *[3], Kokkos::LayoutRight, Kokkos::HostSpace > PositionViewType
void set_has_exclusion(std::size_t i, bool value)
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
Kokkos::View< double *, Kokkos::HostSpace > MassViewType
Kokkos::View< int *, Kokkos::HostSpace > IdViewType
VelocityViewType velocity
void resize(std::size_t num_particles)