Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

ippmLoadIdentity_ma_64f_L how to use?

dhabets
Beginner
1,024 Views
I have an array of matrices and want to set all the matrices to the identity matrix. How do I do this using ippmLoadIdentity_ma_64f_L?

Ipp64f matrixa[] = {
8, 8, 8, 8,
8, 8, 8, 8,
8, 8, 8, 8,
8 ,8 ,8, 8
};
Ipp64f matrixb[] =
{
4, 4, 4, 4,
4, 4, 4, 4,
4, 4, 4, 4,
4, 4, 4, 4
};

Ipp64f matrixc[] =
{
2, 2, 2, 2,
2, 2, 2, 2,
2, 2, 2, 2,
2, 2, 2, 2
};

Ipp64f* pmatrix[] = { matrixb, matrixc, matrixa };

IppStatus status;
status = ippmLoadIdentity_ma_64f_L((const Ipp64f**)pmatrix,0, 0, 0, 4, 4, 3);


It's probably something easy, but what's wrong about the above?
0 Kudos
1 Reply
Vladimir_Dudnik
Employee
1,024 Views
Hi,
The right call is

status = ippmLoadIdentity_ma_64f_L(

(Ipp64f**)pmatrix, 0 , 4*sizeof(Ipp64f), sizeof(Ipp64f), 4, 4, 3);

In MX the stride meaning is address increment (difference) between sequential elements in the row (Stride2) and in the column (Stride1) really. All strides are set explicitly for contiguous array too.

Regards,
Vladimir

0 Kudos
Reply