Learn R Programming

RHPCBenchmark (version 0.1.0)

SparseMatrixVectorMicrobenchmark: Conducts a single performance trial with the matrix-vector multiplication

Description

SparseMatrixVectorMicrobenchmark conducts a single performance trial of the matrix-vector multiplication sparse matrix kernel for the matrix given in the kernelParameters parameter. The function times the single function call kernelParameters$A %*% kernelParameters$b.

Usage

SparseMatrixVectorMicrobenchmark(benchmarkParameters, kernelParameters)

Arguments

benchmarkParameters
an object of type SparseMatrixMicrobenchmark specifying various parameters for microbenchmarking the sparse matrix kernel
kernelParameters
a list of matrices or vectors to be used as input to the sparse matrix kernel

Value

a vector containing the user, system, and elapsed performance timings in that order

Examples

Run this code
## Not run: ------------------------------------
# # Allocate input to the matrix-vector microbenchmark for the first Laplacian
# # matrix
# microbenchmarks <- GetSparseMatrixVectorDefaultMicrobenchmarks()
# kernelParameters <- SparseMatrixVectorAllocator(
#    microbenchmarks[["matvec_laplacian7pt_100"]], 1)
# # Execute the microbenchmark
# timings <- SparseMatrixVectorMicrobenchmark(
#    microbenchmarks[["matvec_laplacian7pt_100"]], kernelParameters)
## ---------------------------------------------

Run the code above in your browser using DataLab