17 #ifndef dealii_memory_space_h
18 #define dealii_memory_space_h
53 template <
typename Number,
typename MemorySpace>
60 "MemorySpace should be Host or CUDA");
101 template <
typename Number,
typename MemorySpace>
108 "MemorySpace should be Host or CUDA");
113 template <
typename Number>
114 struct MemorySpaceData<Number, Host>
141 template <
typename Number>
143 swap(MemorySpaceData<Number, Host> &u, MemorySpaceData<Number, Host> &v)
150 # ifdef DEAL_II_COMPILER_CUDA_AWARE
152 template <
typename Number>
153 struct MemorySpaceData<Number, CUDA>
163 const cudaError_t cuda_error_code =
166 n_elements *
sizeof(Number),
167 cudaMemcpyDeviceToHost);
174 const cudaError_t cuda_error_code =
177 n_elements *
sizeof(Number),
178 cudaMemcpyHostToDevice);
183 std::unique_ptr<Number[], void (*)(Number *)>
values_dev;
188 template <
typename Number>
190 swap(MemorySpaceData<Number, CUDA> &u, MemorySpaceData<Number, CUDA> &v)