* Copy the active data (values for Host and values_dev for CUDA) to @p begin.
* If the data is on the device it is moved to the host.
*/
- virtual void
+ void
copy_to(Number *begin, std::size_t n_elements)
{
(void)begin;
* Copy the data in @p begin to the active data of the structure (values for
* Host and values_dev for CUDA). The pointer @p begin must be on the host.
*/
- virtual void
+ void
copy_from(Number *begin, std::size_t n_elements)
{
(void)begin;
: values(nullptr, &std::free)
{}
- virtual ~MemorySpaceData() = default;
-
- MemorySpaceData(MemorySpaceData &&) noexcept = default;
-
- MemorySpaceData &
- operator=(MemorySpaceData &&) noexcept = default;
-
- virtual void
+ void
copy_to(Number *begin, std::size_t n_elements)
{
std::copy(values.get(), values.get() + n_elements, begin);
}
- virtual void
+ void
copy_from(Number *begin, std::size_t n_elements)
{
std::copy(begin, begin + n_elements, values.get());
, values_dev(nullptr, Utilities::CUDA::delete_device_data<Number>)
{}
- virtual ~MemorySpaceData() = default;
-
- MemorySpaceData(MemorySpaceData &&) noexcept = default;
-
- MemorySpaceData &
- operator=(MemorySpaceData &&) noexcept = default;
-
- virtual void
+ void
copy_to(Number *begin, std::size_t n_elements)
{
const cudaError_t cuda_error_code =
AssertCuda(cuda_error_code);
}
- virtual void
+ void
copy_from(Number *begin, std::size_t n_elements)
{
const cudaError_t cuda_error_code =