gpucoder.matrixMatrixKernel
Optimized GPU implementation of functions containing matrix-matrix operations
Syntax
Description
generates kernels from functions that contain GEMM-like operations. For example,
matching feature points between two images by using:C
= gpucoder.matrixMatrixKernel(fun
,A
,B
)
The sum of absolute differences (SAD) —
F() = @(a,b)abs(a-b)
The sum of squared differences (SSD) —
F() = @(a,b)(a-b).*(a-b)
has the optional argument C
= gpucoder.matrixMatrixKernel(___,orientation
)orientation
that specifies the
orientation of A
and B
matrices.
has the optional argument C
= gpucoder.matrixMatrixKernel(___,vectorizedSim
)vectorizedSim
that specifies use of
vectorized operations during MATLAB® simulation and CPU code generation. The function handle
fun
must support vector inputs and take one row or column
from A
and one column or row from B
and
outputs a vector equivalent to arrayfun(FUN, A, B)
.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2017b