49 new_array.
n = other.
n;
50 return *
this = new_array;
57 array(std::exchange(other.array,
nullptr))
59 other.owns_array =
false;
67 std::swap(
array, other.array);
68 other.owns_array =
false;
Definition: host_array.hpp:11
HostArray(HostArray &&other) noexcept
Definition: host_array.hpp:54
KOKKOS_INLINE_FUNCTION HostArray()
Definition: host_array.hpp:21
T * array
Definition: host_array.hpp:13
size_t size() const
Definition: host_array.hpp:78
const T & operator()(int i) const
Definition: host_array.hpp:74
KOKKOS_INLINE_FUNCTION HostArray & operator=(const HostArray &other)
Definition: host_array.hpp:46
KOKKOS_INLINE_FUNCTION HostArray(const HostArray &other)
Definition: host_array.hpp:40
HostArray(size_t n_in)
Definition: host_array.hpp:26
KOKKOS_INLINE_FUNCTION ~HostArray()
Definition: host_array.hpp:34
size_t n
Definition: host_array.hpp:16
HostArray & operator=(HostArray &&other) noexcept
Definition: host_array.hpp:64
bool owns_array
Definition: host_array.hpp:15
logical false
Definition: module.F90:102
logical true
Definition: module.F90:102