R/gpuFunctions.R
rowSums_gpu.Rd
As rowSums2, but runs on the accelerator when mat is a torch tensor and an accelerator is active.
rowSums2
mat
rowSums_gpu(mat)
a matrix or torch tensor.
a numeric vector (or torch tensor) of row sums.
rowSums_gpu(matrix(1:6, 2, 3)) #> [1] 9 12