buffer.h
Go to the documentation of this file.
67 friend parsec_data_t* detail::get_parsec_data<T, Allocator>(const ttg_parsec::Buffer<T, Allocator>&);
162 //std::cout << "buffer " << this << " other " << &db << " mv op ttg_copy " << m_ttg_copy << std::endl;
220 return static_cast<const_pointer_type>(m_data->device_copies[m_data->owner_device]->device_private);
371 /* only set device if the host has the latest copy as otherwise we might end up with a stale copy */
ttg::device::Device parsec_device_to_ttg_device(int parsec_id)
Definition: device.h:30
int ttg_device_to_parsec_device(const ttg::device::Device &device)
Definition: device.h:18
parsec_data_t * get_parsec_data(const ttg_parsec::Buffer< T, A > &db)
Definition: buffer.h:442
@ SyncIn
@ Allocate
Definition: iovec.h:11
Definition: buffer.h:41
std::add_pointer_t< value_type > pointer_type
Definition: buffer.h:45
const_pointer_type device_ptr_on(const ttg::device::Device &device) const
Definition: buffer.h:233
void prefer_device(ttg::device::Device dev)
Definition: buffer.h:370
void set_current_device(const ttg::device::Device &device)
Definition: buffer.h:178
const_pointer_type owner_device_ptr() const
Definition: buffer.h:218
bool is_valid_on(const ttg::device::Device &device) const
Definition: buffer.h:247
Buffer(const Buffer &db)=delete
ttg::device::Device get_owner_device() const
Definition: buffer.h:190
Buffer(pointer_type ptr, std::size_t n=1, ttg::scope scope=ttg::scope::SyncIn)
Definition: buffer.h:115
pointer_type device_ptr_on(const ttg::device::Device &device)
Definition: buffer.h:225
Buffer & operator=(const Buffer &db)=delete
const_pointer_type current_device_ptr() const
Definition: buffer.h:203
std::allocator_traits< Allocator > allocator_traits
Definition: buffer.h:49
void add_device(ttg::device::Device dev, pointer_type ptr, bool is_current=false)
Definition: buffer.h:378
void allocate_on(const ttg::device::Device &device_id)
Definition: buffer.h:253
typename allocator_traits::allocator_type allocator_type
Definition: buffer.h:50
const std::remove_const_t< value_type > * const_pointer_type
Definition: buffer.h:46
Buffer(std::size_t n, ttg::scope scope=ttg::scope::SyncIn)
Definition: buffer.h:92
void reset(std::size_t n, ttg::scope scope=ttg::scope::SyncIn)
Definition: buffer.h:300
void reset(pointer_type ptr, std::size_t n=1, ttg::scope scope=ttg::scope::SyncIn)
Definition: buffer.h:323
void iovec_add(const ttg::iovec &iov)
Definition: ttg_data_copy.h:419
void add_copy(int parsec_dev, void *ptr)
Definition: ttg_data_copy.h:105
ttg_parsec_data_wrapper_t()
Definition: ttg_data_copy.h:549
ttg_data_copy_t * m_ttg_copy
Definition: ttg_data_copy.h:35
parsec_data_ptr m_data
Definition: ttg_data_copy.h:36
parsec_data_t * parsec_data()
Definition: ttg_data_copy.h:50
void reset_parsec_data(void *ptr, size_t size, bool sync_to_device)
Definition: ttg_data_copy.h:538
Definition: ptr.h:15