Quantcast
Channel: Intel® Software - Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 3005

Copy a submatrix to another matrix.

$
0
0

Hi! I want to copy the first 2 columns of a matrix A to the last two columns of another matrix B. A and B is matrices of size  3x3. I found that this can be done with the function   p?lacpy ( I don't know if there is another routine for this)

The code I used is

#include <stdio.h>           
#include <mkl.h>
#include "mkl_scalapack.h"

int main()
{	
double A[9]={0, 1,2,3,4,5,6,7,8};
	double B[9];
	
	int m=3, n=2, d=1;
char *uplo = "All";

	pdlacpy(uplo, &m, &n, A, 0, 0, ?, B, 0, &d, ?);

}

I don't understand what do we select for the parameters  descb and desca. I read that is " INTEGER array, DIMENSION (dlen_). The array descriptor for the distributed matrix A." but I don't understand what does it mean.

 

Thank you very much.


Viewing all articles
Browse latest Browse all 3005

Trending Articles



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