Skip to content

Commit 29dc086

Browse files
authored
Add macros for 32/64bit integer printf
1 parent 8b3f971 commit 29dc086

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

lapack-netlib/LAPACKE/example/example_DGESV_colmajor.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@
2525
2626
LAPACKE_dgesv (col-major, high-level) Example Program Results
2727
28-
-- LAPACKE Example routine (version 3.7.0) --
28+
-- LAPACKE Example routine --
2929
-- LAPACK is a software package provided by Univ. of Tennessee, --
3030
-- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
31-
December 2016
32-
3331
*/
3432
/* Includes */
3533
#include <stdlib.h>
@@ -94,7 +92,7 @@ int main(int argc, char **argv) {
9492
/* Check for the exact singularity */
9593
if( info > 0 ) {
9694
printf( "The diagonal element of the triangular factor of A,\n" );
97-
printf( "U(%i,%i) is zero, so that A is singular;\n", info, info );
95+
printf( "U(%" LAPACK_IFMT ",%" LAPACK_IFMT ") is zero, so that A is singular;\n", info, info );
9896
printf( "the solution could not be computed.\n" );
9997
exit( 1 );
10098
}

lapack-netlib/LAPACKE/example/example_DGESV_rowmajor.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@
2525
2626
LAPACKE_dgesv (row-major, high-level) Example Program Results
2727
28-
-- LAPACKE Example routine (version 3.7.0) --
28+
-- LAPACKE Example routine --
2929
-- LAPACK is a software package provided by Univ. of Tennessee, --
3030
-- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
31-
December 2016
32-
3331
*/
3432
#include <stdlib.h>
3533
#include <stdio.h>
@@ -91,7 +89,7 @@ int main(int argc, char **argv) {
9189
/* Check for the exact singularity */
9290
if( info > 0 ) {
9391
printf( "The diagonal element of the triangular factor of A,\n" );
94-
printf( "U(%i,%i) is zero, so that A is singular;\n", info, info );
92+
printf( "U(%" LAPACK_IFMT ",%" LAPACK_IFMT ") is zero, so that A is singular;\n", info, info );
9593
printf( "the solution could not be computed.\n" );
9694
exit( 1 );
9795
}

lapack-netlib/LAPACKE/example/lapacke_example_aux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ void print_matrix_colmajor( char* desc, lapack_int m, lapack_int n, double* mat,
2828
void print_vector( char* desc, lapack_int n, lapack_int* vec ) {
2929
lapack_int j;
3030
printf( "\n %s\n", desc );
31-
for( j = 0; j < n; j++ ) printf( " %6i", vec[j] );
31+
for( j = 0; j < n; j++ ) printf( " %6" LAPACK_IFMT, vec[j] );
3232
printf( "\n" );
3333
}

0 commit comments

Comments
 (0)