gemvgpu: gemvgpu

Description Usage Arguments Value See Also Examples

View source: R/L2blas.R

Description

This function computes matrix-vector multipication y = a A x + b y by using CUDA cublas function cublasDgemv

Usage

1
gemvgpu(trans = 1, alpha = 1, A, x, beta = 0, y)

Arguments

trans

matrix A transpose operator, 1 (non-transpose), 2 (transpose), 3 (conjugate transpose); default at 1 (non-transpose)

alpha

scale factor a of matrix A; default 1

A

input matrix; list of R external GPU pointer and dimension

x

input vector; list of R external GPU pointer and dimension

beta

scale factor b of vector y; default 0

y

input/output vector; list of R external GPU pointer and dimension

Value

vector y, a list consisting of

See Also

gergpu

Examples

1
2
3
4
5
6
7
8
A <- 1:12
x <- 1:3
y <- 1:4
A_gpu <- creategpu(A, 4, 3)
x_gpu <- creategpu(x)
y_gpu <- creategpu(y)
gemvgpu(trans = 1, alpha = 1, A_gpu, x_gpu, beta = 1, y_gpu)
gathergpu(y_gpu)

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