Crate coaster_blas[−][src]
Expand description
Provides backend-agnostic BLAS operations for Coaster.
BLAS (Basic Linear Algebra Subprograms) is a specification that prescribes a set of low-level
routines for performing common linear algebra operations such as vector addition, scalar
multiplication, dot products, linear combinations, and matrix multiplication. They are the de
facto standard low-level routines for linear algebra libraries; the routines have bindings for
both C and Fortran. Although the BLAS specification is general, BLAS implementations are often
optimized for speed on a particular machine, so using them can bring substantial performance
benefits. BLAS implementations will take advantage of special floating point hardware such as
vector registers or SIMD instructions.
Source
Overview
A Coaster Plugin describes the functionality through three types of traits.
-
PluginTrait -> IBlas
This trait provides ‘provided methods’, which already specify the exact, backend-agnostic behavior of an Operation. These come in two formsoperation()
andoperation_plain()
, where the first takes care of full memory management and the later one just provides the computation without any memory management. In some scenarios you would like to use the plain operation for faster exection. -
BinaryTrait -> IBlasBinary
The binary trait provides the actual and potentially initialized Functions, which are able to compute the Operations (as they implement the OperationTrait). -
OperationTrait -> e.g. IOperationDot
The PluginTrait can provide ‘provided methods’, thanks to the OperationTrait. The OperationTrait, has one required methodcompute
which every Framework Function will implement on it’s own way.
Beside these traits a Coaster Plugin might also use macros for faster implementation for various Coaster Frameworks such as CUDA, OpenCL or common host CPU.
Beside these generic functionality through traits, a Plugin also extends the Coaster Backend with implementations of the generic functionality for the Coaster Frameworks.
For more information, give the Coaster docs a visit.
Modules
Provides the IBlasBinary binary trait for Coaster’s Framework implementation.
Provides the specific Framework implementations for the Library Operations.
Provides the IOperationX operation traits for Coaster’s Framework implementation.
Provides the IBlas library trait for Coaster implementation.
Provides the Transpose functionality for Matrix operations.
Macros
asum with cuda
axpy with cuda
copy for cuda
dot product for cuda
gbmv for cuda
gemm for cuda
nrm2 for cuda
scalar mul for cuda
swap matrices for cuda