gemmgpu: gemmgpu

Description Usage Arguments Value See Also Examples

View source: R/L3blas.R

Description

This function computes the matrix-matrix multiplication C = a op ( A ) op ( B ) + b C by using CUDA cublas function cublasDgemm

Usage

1
gemmgpu(transa = 1, transb = 1, alpha = 1, A, B, beta = 0, C)

Arguments

transa

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

transb

matrix B 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

B

input matrix; list of R external GPU pointer and dimension

beta

scale factor b of matrix C; default 0

C

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

Value

updated matrix C, a list consisting of

See Also

gemvgpu

Examples

1
2
3
4
5
A_gpu <- creategpu(1:6, 3, 2)
B_gpu <- creategpu(1:6, 3, 2)
C_gpu <- creategpu(1:4, 2, 2)
gemmgpu(2, 1, 1, A_gpu, B_gpu, beta=1, C_gpu)
gathergpu(C_gpu)

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