From: Peter Munch Date: Wed, 21 Oct 2020 05:09:36 +0000 (+0200) Subject: Revert changes to MemorySpaceData X-Git-Tag: v9.3.0-rc1~990^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b0d53d8dd7eea0aa5f283cee307a3590fa78258;p=dealii.git Revert changes to MemorySpaceData --- diff --git a/include/deal.II/base/memory_space_data.h b/include/deal.II/base/memory_space_data.h index 7cb37bc1fa..da957755d6 100644 --- a/include/deal.II/base/memory_space_data.h +++ b/include/deal.II/base/memory_space_data.h @@ -48,7 +48,7 @@ namespace MemorySpace * 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; @@ -59,7 +59,7 @@ namespace MemorySpace * 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; @@ -101,20 +101,13 @@ namespace MemorySpace : 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()); @@ -148,14 +141,7 @@ namespace MemorySpace , values_dev(nullptr, Utilities::CUDA::delete_device_data) {} - 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 = @@ -166,7 +152,7 @@ namespace MemorySpace AssertCuda(cuda_error_code); } - virtual void + void copy_from(Number *begin, std::size_t n_elements) { const cudaError_t cuda_error_code =