buffer.h
Go to the documentation of this file.
109 if (!device.is_host()) throw std::runtime_error("MADNESS backend does not support non-host memory!");
150 if (device.is_device()) throw std::runtime_error("MADNESS missing support for non-host memory!");
158 if (device.is_device()) throw std::runtime_error("MADNESS missing support for non-host memory!");
172 if (device.is_device()) throw std::runtime_error("MADNESS missing support for non-host memory!");
auto wrap(funcT &&func, const std::tuple< ttg::Edge< keyT, input_edge_valuesT >... > &inedges, const std::tuple< output_edgesT... > &outedges, const std::string &name="wrapper", const std::vector< std::string > &innames=std::vector< std::string >(sizeof...(input_edge_valuesT), "input"), const std::vector< std::string > &outnames=std::vector< std::string >(sizeof...(output_edgesT), "output"))
Definition: make_tt.h:595
A runtime-managed buffer mirrored between host and device memory.
Definition: buffer.h:10
ttg::device::Device get_owner_device() const
Definition: buffer.h:115
Buffer & operator=(const Buffer &db)=delete
const element_type * device_ptr_on(const ttg::device::Device &device) const
Definition: buffer.h:156
const element_type * current_device_ptr() const
Definition: buffer.h:127
element_type * device_ptr_on(const ttg::device::Device &device)
Definition: buffer.h:148
const element_type * owner_device_ptr() const
Definition: buffer.h:141
Buffer(const Buffer &db)=delete
bool is_valid_on(const ttg::device::Device &device) const
Definition: buffer.h:170
void allocate_on(const ttg::device::Device &device_id)
Definition: buffer.h:176
typename allocator_traits::allocator_type allocator_type
Definition: buffer.h:15
std::allocator_traits< Allocator > allocator_traits
Definition: buffer.h:14
void set_current_device(const ttg::device::Device &device)
Definition: buffer.h:107