How do I do this using Intel MKL?
res(:,:,:,i+j+k) = var(:,:,:,1)*op(1)+var(:,:,:,2)*op(2)
In this example, 'res' is a matrix with 4 dimensions, of which the last one is only two.
'op' is a vector two elements long.
I have found https://software.intel.com/en-us/mkl-developer-reference-c-mkl-sparse-mm which is good as there are two scalars which the matrices are multiplied by. However, there is A, B, and C in the documentation whereas I have only two matrices.
Also if you could please recommend some literature that introduces me to Intel MKL with problem sets to practice by myself, I would be happy to give it a go. I find Intel MKL confusing and now I get most of the answers by searching 'do something intel mkl' replacing 'do something' with what I need. Perhaps this is not very efficient...