fml  0.1-0
Fused Matrix Library
copy.hh
1 // This file is part of fml which is released under the Boost Software
2 // License, Version 1.0. See accompanying file LICENSE or copy at
3 // https://www.boost.org/LICENSE_1_0.txt
4 
5 #ifndef FML_PAR_GPU_COPY_H
6 #define FML_PAR_GPU_COPY_H
7 #pragma once
8 
9 
10 #include <stdexcept>
11 
12 #include "../comm.hh"
13 #include "parmat.hh"
14 
15 #include "../../gpu/cpumat.hh"
16 #include "../../gpu/copy.hh"
17 
18 
19 namespace fml
20 {
21 namespace copy
22 {
38  template <typename REAL_IN, typename REAL_OUT>
39  void par2par(const parmat_gpu<REAL_IN> &par_in, parmat_gpu<REAL_OUT> &par_out)
40  {
41  par_out.resize(par_in.nrows(), par_in.ncols());
42  gpu2gpu(par_in.data_obj(), par_out.data_obj());
43  }
44 }
45 }
46 
47 
48 #endif
fml::parmat_gpu
Definition: parmat.hh:20
fml::copy::par2par
void par2par(const parmat_cpu< REAL_IN > &par_in, parmat_cpu< REAL_OUT > &par_out)
Copy data from a PAR object to another.
Definition: copy.hh:123
fml::copy::gpu2gpu
void gpu2gpu(const gpuvec< REAL_IN > &gpu_in, gpuvec< REAL_OUT > &gpu_out)
Copy data from a GPU object to another.
Definition: copy.hh:203
fml
Core namespace.
Definition: dimops.hh:10