scaleGPU: scalegpu

Description Usage Arguments Value See Also Examples

Description

This function scales the given vector/matrix by a scalar by using CUDA cublas function cublasDcopy

Usage

1
scalegpu(input, alpha)

Arguments

input

list consisting of R external GPU pointer and dimension

alpha

scale factor

Value

scaled vector/matrix, a list consisting of

See Also

expgpu

Examples

1
2
3
4
5
a <- 1:4
b <- 2
a_gpu <- creategpu(a)
scalegpu(a_gpu, b) -> b_gpu
gathergpu(b_gpu)

yuanli22/RCUDA documentation built on May 4, 2019, 6:35 p.m.