Function:MatMulTrans

From CUVI Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Performs matrix multiplication with its transpose.

Function

CuviStatus matMulTrans(const CuviImage& A,
                       CuviImage& B,
                       bool trans = false,
                       const CuviStream& stream = CuviStream());

Parameters

Name Type Description
A CuviImage& Input Image
B CuviImage& Resultant Image
stream CuviStream& GPU stream ID for execution

Image Type Support

Input Output
32f single channel 32f single channel

Example

CuviSize aSize(3,3);

//Initialize input image
CuviImage A(aSize, CUVI_32FC1);

//Fill image with random values
cuvi::dataExchange::generateRandomImage(A);

CuviImage B;

//Perform matrix multiplication (A * A')
cuvi::arithmeticLogical::matMulTrans(A,B);

//The order of multiplication can be reversed to (A' * A)
cuvi::arithmeticLogical::matMulTrans(A,B,true);