Skip to contents

Downloads 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.

Usage

amatrix_materialize_host(x)

Arguments

x

An aMatrix object (adgeMatrix, adgCMatrix, or aTransposeView).

Value

A dgeMatrix, dgCMatrix, or the original object if no materialization is needed.

Examples

m <- adgeMatrix(matrix(1:6, 2, 3))
host <- amatrix_materialize_host(m)
class(host)
#> [1] "dgeMatrix"
#> attr(,"package")
#> [1] "Matrix"