13#include <cuda_runtime.h>
14#include <cuda_runtime_api.h>
16#include <muda/viewer/dense.h>
52 size_t m_capacity = 0;
71 void copy_to(std::vector<T>& host)
const;
72 void copy_from(
const std::vector<T>& host);
74 void resize(
size_t new_size);
75 void resize(
size_t new_size,
const T& value);
76 void reserve(
size_t new_capacity);
79 void fill(
const T& v);
84 BufferView<T> view(
size_t offset,
size_t size = ~0) MUDA_NOEXCEPT;
86 CBufferView<T> view(
size_t offset,
size_t size = ~0)
const MUDA_NOEXCEPT;
93 auto size()
const MUDA_NOEXCEPT {
return m_size; }
94 auto capacity()
const MUDA_NOEXCEPT {
return m_capacity; }
95 T* data() MUDA_NOEXCEPT {
return m_data; }
96 const T* data()
const MUDA_NOEXCEPT {
return m_data; }
100#include "details/device_buffer.inl"
A view interface for any array-like liner memory, which can be constructed from DeviceBuffer/DeviceVe...
Definition buffer_launch.h:13
Definition buffer_view.h:24
A std::vector like wrapper of cuda device memory, allows user to:
Definition device_buffer.h:46
Definition nd_reshaper.h:16