Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Error in documentation

renorm2
Beginner
366 Views

Here https://software.intel.com/en-us/node/520871 in packed storage description.

This k(i, j) = i - 1 + (j - 1)/2 seems to be incorrect.

0 Kudos
4 Replies
Gennady_F_Intel
Moderator
366 Views

pls clarify why do you think this is wrong description

0 Kudos
renorm2
Beginner
366 Views

Index k doesn't cover the entire range from 1 to n*(n + 1)/2 needed to store all elements of symmetric matrix.

Also, k is 0 when both i and j are equal to 1, while Fortran arrays are 1 based.

0 Kudos
Konstantin_A_Intel
366 Views

Hi,

You're right, there's an error in formula. It should be i-1+j*(j-1)/2 instead. However, it is correct that k(1,1)=0 as the link you were referred to is C documentation. In C documentation, we provide indices in C array notation. If you need an index in Fortran array, your formula would be i+j*(j-1)/2

Thank you very much for finding this! We will fix it ASAP.

Best regards,

Konstantin

0 Kudos
Gennady_F_Intel
Moderator
366 Views

status - escalated. we will let you know when the fix the problem.

0 Kudos
Reply