5 #ifndef OMEGA_H_ARRAY_KOKKOS_HPP
6 #define OMEGA_H_ARRAY_KOKKOS_HPP
11 OMEGA_H_INLINE Write<T>::Write() : view_() {}
14 OMEGA_H_INLINE LO Write<T>::size() const OMEGA_H_NOEXCEPT {
15 #ifdef OMEGA_H_CHECK_BOUNDS
16 OMEGA_H_CHECK(exists());
18 return static_cast<LO
>(view_.size());
22 OMEGA_H_DEVICE T& Write<T>::operator[](LO i)
const OMEGA_H_NOEXCEPT {
23 #ifdef OMEGA_H_CHECK_BOUNDS
24 OMEGA_H_CHECK_OP(0, <=, i);
25 OMEGA_H_CHECK_OP(i, <, size());
31 OMEGA_H_INLINE T* Write<T>::data() const noexcept {
36 long Write<T>::use_count()
const {
37 return manager_ ? manager_.use_count() : view_.use_count();
41 OMEGA_H_INLINE
bool Write<T>::exists() const noexcept {
42 return view().data() !=
nullptr
43 #if defined(KOKKOS_ENABLE_DEPRECATED_CODE) && (!defined(__CUDA_ARCH__))
46 || view().use_count() != 0
52 inline T
const& HostRead<T>::operator[](LO i)
const OMEGA_H_NOEXCEPT {
53 #ifdef OMEGA_H_CHECK_BOUNDS
54 OMEGA_H_CHECK_OP(0, <=, i);
55 OMEGA_H_CHECK_OP(i, <, size());
61 inline T& HostWrite<T>::operator[](LO i)
const OMEGA_H_NOEXCEPT {
62 #ifdef OMEGA_H_CHECK_BOUNDS
63 OMEGA_H_CHECK_OP(0, <=, i);
64 OMEGA_H_CHECK_OP(i, <, size());
Definition: amr_mpi_test.cpp:6