buffer.h
Go to the documentation of this file.
68 friend parsec_data_t* detail::get_parsec_data<T, Allocator>(const ttg_parsec::Buffer<T, Allocator>&);
168 //std::cout << "buffer " << this << " other " << &db << " mv op ttg_copy " << m_ttg_copy << std::endl;
246 return static_cast<const_pointer_type>(m_data->device_copies[m_data->owner_device]->device_private);
411 /* 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:480
@ SyncIn
@ Allocate
Definition: iovec.h:11
Definition: buffer.h:42
std::add_pointer_t< value_type > pointer_type
Definition: buffer.h:46
const_pointer_type device_ptr_on(const ttg::device::Device &device) const
Definition: buffer.h:260
void prefer_device(ttg::device::Device dev)
Definition: buffer.h:410
void set_current_device(const ttg::device::Device &device)
Definition: buffer.h:184
const_pointer_type owner_device_ptr() const
Definition: buffer.h:243
bool is_valid_on(const ttg::device::Device &device) const
Definition: buffer.h:277
Buffer(const Buffer &db)=delete
ttg::device::Device get_owner_device() const
Definition: buffer.h:211
Buffer(pointer_type ptr, std::size_t n=1, ttg::scope scope=ttg::scope::SyncIn)
Definition: buffer.h:121
pointer_type device_ptr_on(const ttg::device::Device &device)
Definition: buffer.h:251
Buffer & operator=(const Buffer &db)=delete
const_pointer_type current_device_ptr() const
Definition: buffer.h:226
std::allocator_traits< Allocator > allocator_traits
Definition: buffer.h:50
void add_device(ttg::device::Device dev, pointer_type ptr, bool is_current=false)
Definition: buffer.h:418
bool is_current_on(ttg::device::Device dev) const
Definition: buffer.h:194
void allocate_on(const ttg::device::Device &device_id)
Definition: buffer.h:283
typename allocator_traits::allocator_type allocator_type
Definition: buffer.h:51
const std::remove_const_t< value_type > * const_pointer_type
Definition: buffer.h:47
Buffer(std::size_t n, ttg::scope scope=ttg::scope::SyncIn)
Definition: buffer.h:98
void reset(std::size_t n, ttg::scope scope=ttg::scope::SyncIn)
Definition: buffer.h:334
void reset(pointer_type ptr, std::size_t n=1, ttg::scope scope=ttg::scope::SyncIn)
Definition: buffer.h:357
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