Copy the data in one CPU object to another. The objects must be of the same class (e.g. cpuvec/cpuvec and cpumat/cpumat), but they can be of different fundamental types (e.g. float/double).
cpu2cpu(cpu_in, cpu_out)
cpu_in | Input. |
---|---|
cpu_out | Ouput. |
Returns NULL
.
library(fmlr) x = cpumat(3, 2) x$fill_linspace(1, 6) y = cpumat(type="float") cpu2cpu(x, y) y$info()#> # cpumat 3x2 type=fy#> 1.0000 4.0000 #> 2.0000 5.0000 #> 3.0000 6.0000 #>