axpygpu: axpygpu

Description Usage Arguments Value See Also Examples

View source: R/L1blas.R

Description

This function multiplies the vector x by the scalar a and adds it to the vector y, and overwrites y as the result. by using CUDA cublas function cublasDaxpy. y = a x + y

Usage

1
axpygpu(x, y, alpha = 1)

Arguments

x

list consisting of R external GPU pointer and dimension

y

list consisting of R external GPU pointer and dimension

alpha

scale factor alpha; default 1

Value

updated y vector/matrix

See Also

scalgpu

Examples

1
2
3
4
a <- 1:4
a_gpu <- creategpu(a)
b_gpu <- creategpu(a)
axpygpu(a_gpu, b_gpu, 1) 

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