identity_matrix: Identity Matrix on Device

View source: R/methods-vclMatrix.R

identity_matrixR Documentation

Identity Matrix on Device

Description

Creates an identity matrix directly on the current device (e.g. GPU)

Usage

identity_matrix(x, type = NULL)

Arguments

x

A numeric value indicating the order of the identity matrix

type

A character string specifying the type of gpuMatrix. Default is derived from getOption("gpuR.default.type").

Value

A vclMatrix object

Note

This function was only created for vclMatrix objects as the copy from CPU to gpuMatrix is trivial using the base diag function.

Author(s)

Charles Determan Jr.


gpuR documentation built on May 29, 2024, 11:56 a.m.