Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

Use ?gbmv with a 3d array.

$
0
0

Let assume the we have a 3d array A and a matrix B of size 2x5.

int A[3][2][2]= { {{1,2},{3,4} }, {{5,6},{7,8}}, {{9,10},{11,12}} };

 I want to program the following:

cs =0.0;

for j=1 until 3

Multiply the Aj matrix with the t-j column of the B matrix and add the result to the term cs.

end

I have read the function ?gbmv which computes a matrix-vector product using a general band matrix, but I don't know how to do that when the matrix is a 3d array. In this site http://software.intel.com/sites/products/documentation/hpc/mkl/mklman/GU... I read the following

"Array, DIMENSION (lda, n).

Before entry, the leading (kl + ku + 1) by n part of the array a must contain the matrix of coefficients. This matrix must be supplied column-by-column, with the leading diagonal of the matrix in row (ku + 1) of the array, the first super-diagonal starting at position 2 in row ku, the first sub-diagonal starting at position 1 in row (ku + 2), and so on. Elements in the array a that do not correspond to elements in the band matrix (such as the top left ku by ku triangle) are not referenced."

But I don't understand it.

Could you help me, please. A simple example would help me.

Thank you very much.

 


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>