35 #include "../backends.h"
36 #include "../decorators.h"
49 typename _index_type =
uint32,
50 typename allocator =
typename default_memory_allocator<system>::type>
84 template <
typename value_type>
105 template <
typename value_type>
138 if (old_storage !=
nullptr)
161 template <
typename other_allocation>
162 void copy(
const other_allocation& other)
164 __internal::check_value_type_assignment_compatible<value_type, typename other_allocation::value_type>();
174 cudaMemcpy((
void *)
base::data(), other.data(),
sizeof(
value_type) * other.size(), cudaMemcpyDeviceToDevice);
177 cudaMemcpy((
void *)
base::data(), other.data(),
sizeof(
value_type) * other.size(), cudaMemcpyHostToDevice);
184 cudaMemcpy((
void *)
base::data(), other.data(),
sizeof(
value_type) * other.size(), cudaMemcpyDeviceToHost);
197 cudaMemcpy(dst, src, size, cudaMemcpyDeviceToDevice);
199 memcpy(dst, src, size);
base::value_type value_type
pointer< system, T, _index_type > base
LIFT_HOST_DEVICE allocation(const allocation &other)
LIFT_HOST_DEVICE allocation()
tagged_pointer_base< host, T, _index_type > base
allocation(const std::initializer_list< value_type > &l)
LIFT_HOST_DEVICE pointer_type data() const
virtual void resize(size_type count)
allocation(const pointer< system, value_type, index_type > &other)
allocation(size_type count)
base::pointer_type pointer_type
Lift's tagged pointer class.
void device_memory_copy(void *dst, const void *src, size_t size)
LIFT_HOST_DEVICE size_type size() const
allocation & operator=(const pointer< system, value_type, index_type > &other)
void poke(index_type pos, const value_type value)
base::size_type size_type
void copy(const other_allocation &other)
allocation & operator=(const std::initializer_list< value_type > &l)
base::index_type index_type