LAPACK
3.5.0
LAPACK: Linear Algebra PACKage
Main Page
Data Types List
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Macros
lapacke_example_aux.c
Go to the documentation of this file.
1
#include <
lapacke.h
>
2
#include <stdio.h>
3
4
/* Auxiliary routine: printing a matrix */
5
void
print_matrix_rowmajor
(
char
* desc,
lapack_int
m,
lapack_int
n,
double
* mat,
lapack_int
ldm ) {
6
lapack_int
i,
j
;
7
printf(
"\n %s\n"
, desc );
8
9
for
( i = 0; i < m; i++ ) {
10
for
( j = 0; j < n; j++ ) printf(
" %6.2f"
, mat[i*ldm+j] );
11
printf(
"\n"
);
12
}
13
}
14
15
16
/* Auxiliary routine: printing a matrix */
17
void
print_matrix_colmajor
(
char
* desc,
lapack_int
m,
lapack_int
n,
double
* mat,
lapack_int
ldm ) {
18
lapack_int
i,
j
;
19
printf(
"\n %s\n"
, desc );
20
21
for
( i = 0; i < m; i++ ) {
22
for
( j = 0; j < n; j++ ) printf(
" %6.2f"
, mat[i+j*ldm] );
23
printf(
"\n"
);
24
}
25
}
26
27
/* Auxiliary routine: printing a vector of integers */
28
void
print_vector
(
char
* desc,
lapack_int
n,
lapack_int
* vec ) {
29
lapack_int
j
;
30
printf(
"\n %s\n"
, desc );
31
for
( j = 0; j < n; j++ ) printf(
" %6i"
, vec[j] );
32
printf(
"\n"
);
33
}
lapacke
example
lapacke_example_aux.c
Generated on Mon Dec 30 2013 16:09:14 for LAPACK by
1.8.1.2