ScaLAPACK 2.1  2.1
ScaLAPACK: Scalable Linear Algebra PACKage
BI_imvcopy.c
Go to the documentation of this file.
1 #include "Bdef.h"
2 void BI_imvcopy(int m, int n, int *A, int lda, int *buff)
3 /*
4  * Performs a matrix to vector copy (pack) for the data type int
5  */
6 {
7  int i, j;
8 
9  if ( (m == lda) || (n == 1) )
10  {
11  m = n * m;
12  for (i=0; i < m; i++) buff[i] = A[i];
13  }
14  else if (m == 1)
15  {
16  for (j=0; j < n; j++) buff[j] = A[j*lda];
17  }
18  else
19  {
20  for (j=0; j < n; j++)
21  {
22  for (i=0; i < m; i++) buff[i] = A[i];
23  A += lda;
24  buff += m;
25  }
26  }
27 }
Bdef.h
BI_imvcopy
void BI_imvcopy(int m, int n, int *A, int lda, int *buff)
Definition: BI_imvcopy.c:2