Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
6588 Discussions

calling mkl with multidimensional arrays

tracyx
New Contributor I
217 Views
Hello,
When an MKL routine requires an array for input and/or output, is it always safe to call MKL from Fortran passing a multi-dimensional array, rather than passing a single dimensional array (with the same total size)?
Thanks
Tracy
0 Kudos
1 Solution
Ying_H_Intel
Employee
217 Views
Hello Tracy,

What is the problem are you seeing? MKL support fortran interface call. So it should be safe to feed it with multi-dimension array. It will read it as single dimension array based on column-major order.
It seems more Fortan language feature other than MKL feature.

Best Regards,
Ying

View solution in original post

2 Replies
Ying_H_Intel
Employee
218 Views
Hello Tracy,

What is the problem are you seeing? MKL support fortran interface call. So it should be safe to feed it with multi-dimension array. It will read it as single dimension array based on column-major order.
It seems more Fortan language feature other than MKL feature.

Best Regards,
Ying
tracyx
New Contributor I
217 Views
Hi Ying,
Thanks for your email - I wasn't seeing any problem, I just was not sure whether I could always be sure that it would always work like that.
Tracy
Reply