Difference between revisions of "Function:MatMul"

From CUVI Wiki
 
(One intermediate revision by the same user not shown)
Line 42: Line 42:
|}
|}


===Image Type Support===
====Image Type Support====
 
{|
|style="font-size:75%;"|
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 53: Line 54:
| 32fc1
| 32fc1
| 32fc1
| 32fc1
|}
|}
|}


===Example===
====Code Example====
{|
{|
|style="font-size:150%;"|
|style="font-size:100%;"|
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">



Latest revision as of 20:17, 18 October 2022

Performs matrix multiplication

Function

CuviStatus matMul(const CuviImage& A,
                  const CuviImage& B,
                  CuviImage& C,
                  const CuviStream& stream = CuviStream());

Parameters

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

Image Type Support

Input 1 Input 2 Output
32fc1 32fc1 32fc1

Code Example

CuviSize aSize(3,3);
CuviSize bSize(3,3);

//Initialize images
CuviImage A(aSize, CUVI_32FC1);
CuviImage B(bSize, CUVI_32FC1);

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


CuviImage C;

//Perform matrix multiplication
cuvi::arithmeticLogical::matMul(A,B,C);