7 #ifndef _MGCPP_VECTOR_DEVICE_VECTOR_HPP_ 8 #define _MGCPP_VECTOR_DEVICE_VECTOR_HPP_ 20 #include <initializer_list> 24 template <
typename Type,
typename Alloc = mgcpp::allocator<Type>>
61 Alloc const& alloc = Alloc());
65 Alloc const& alloc = Alloc());
68 Alloc const& alloc = Alloc());
71 Alloc const& alloc = Alloc());
75 Alloc const& alloc = Alloc());
79 template <typename DenseVec>
86 Alloc const& alloc = Alloc());
88 template <typename DenseVec>
114 inline size_t capacity()
const noexcept;
124 inline size_t device_id()
const noexcept;
126 inline size_t size()
const noexcept;
size_t capacity() const noexcept
Definition: adapter_base.hpp:14
Definition: adapter_base.hpp:12
Definition: thread_context.hpp:20
device_vector< Type, Alloc > & resize(size_t size, value_type pad_value=value_type{})
size_t size() const noexcept
device_vector< Type, Alloc > & zero()
value_type check_value(size_t i) const
device_pointer data_mutable() noexcept
Definition: dvec_expr.hpp:20
Type value_type
Definition: device_vector.hpp:30
Definition: dense_vector.hpp:15
Alloc allocator_type
Definition: device_vector.hpp:39
typename device_value_type< Type >::type device_value_type
Definition: device_vector.hpp:33
Definition: is_supported_type.hpp:16
value_type const * const_pointer
Definition: device_vector.hpp:32
Definition: device_vector.hpp:25
size_t device_id() const noexcept
thread_context * context() const noexcept
const_device_pointer data() const noexcept
void copy_to_host(pointer host_p) const
#define MGCPP_CONCEPT(...)
Definition: concept.hpp:10
device_value_type const * const_device_pointer
Definition: device_vector.hpp:35
device_vector< Type, Alloc > this_type
Definition: device_vector.hpp:29
value_type * pointer
Definition: device_vector.hpp:31
void init(bool print_system_info=true)
Alloc allocator() const noexcept
device_value_type * device_pointer
Definition: device_vector.hpp:34
Type type
Definition: device_value_type.hpp:20
shape_type shape() const noexcept
void set_value(size_t i, value_type value)
static device_vector from_c_array(Type(&arr)[S], Alloc const &alloc=Alloc())
device_pointer release_data() noexcept