type: Get or set the type of a GPU object

Description Arguments Value Author(s) See Also Examples

Description

These functions may be used to get or set the type of a GPU object. May be used as type(x) type(x)<-value

Arguments

x

A GPU object of class gvector or gmatrix

value

The type to convert the object to. There are three different ways to specify this. One may use the "double", "single", "integer" or "logical" notation. Alternatively the short form "d", "s", "i" or "s" notation may be used. Finally the internal integer representation of 0L, 1L, 2L or 3L may be used.

Value

type(x) returns the type of x type(x)<-value change the type of x

Author(s)

Nathan Morris

See Also

convertType

Examples

1
2
x=g(1:4)
type(x)="d" #change the type from "integer" to "double"

gmatrix documentation built on May 29, 2017, 2:20 p.m.