Force materialization of an aMatrix to a host Matrix object
Source:R/residency.R
amatrix_materialize_host.RdDownloads any GPU-resident data and returns a standard
Matrix-package object on the host. For adgeMatrix
inputs the result is a dgeMatrix; for adgCMatrix
inputs the result is a dgCMatrix; for aTransposeView
the transposed dense host matrix is returned. Host-only objects are
returned unchanged.
Examples
m <- adgeMatrix(matrix(1:6, 2, 3))
host <- amatrix_materialize_host(m)
class(host)
#> [1] "dgeMatrix"
#> attr(,"package")
#> [1] "Matrix"