Skip to content

Commit 2bb3d99

Browse files
authored
Merge branch 'master' into skew-symmetric-new
2 parents b15a164 + 14df73a commit 2bb3d99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+905
-736
lines changed

BLAS/SRC/dnrm2.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function DNRM2( n, x, incx )
8989
integer, parameter :: wp = kind(1.d0)
9090
real(wp) :: DNRM2
9191
!
92-
! -- Reference BLAS level1 routine (version 3.9.1) --
92+
! -- Reference BLAS level1 routine --
9393
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
9494
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
9595
! March 2021

BLAS/SRC/drotm.f

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
*> H=( ) ( ) ( ) ( )
3939
*> (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
4040
*> SEE DROTMG FOR A DESCRIPTION OF DATA STORAGE IN DPARAM.
41+
*>
42+
*> IF DFLAG IS NOT ONE OF THE LISTED ABOVE, THE BEHAVIOR IS UNDEFINED.
43+
*> NANS IN DFLAG MAY NOT PROPAGATE TO THE OUTPUT.
44+
*>
4145
*> \endverbatim
4246
*
4347
* Arguments:

BLAS/SRC/dznrm2.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function DZNRM2( n, x, incx )
9090
integer, parameter :: wp = kind(1.d0)
9191
real(wp) :: DZNRM2
9292
!
93-
! -- Reference BLAS level1 routine (version 3.9.1) --
93+
! -- Reference BLAS level1 routine --
9494
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
9595
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
9696
! March 2021

BLAS/SRC/scnrm2.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function SCNRM2( n, x, incx )
9090
integer, parameter :: wp = kind(1.e0)
9191
real(wp) :: SCNRM2
9292
!
93-
! -- Reference BLAS level1 routine (version 3.9.1) --
93+
! -- Reference BLAS level1 routine --
9494
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
9595
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
9696
! March 2021

BLAS/SRC/snrm2.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function SNRM2( n, x, incx )
8989
integer, parameter :: wp = kind(1.e0)
9090
real(wp) :: SNRM2
9191
!
92-
! -- Reference BLAS level1 routine (version 3.9.1) --
92+
! -- Reference BLAS level1 routine --
9393
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
9494
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
9595
! March 2021

BLAS/SRC/srotm.f

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
*> (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0).
4040
*> SEE SROTMG FOR A DESCRIPTION OF DATA STORAGE IN SPARAM.
4141
*>
42+
*> IF SFLAG IS NOT ONE OF THE LISTED ABOVE, THE BEHAVIOR IS UNDEFINED.
43+
*> NANS IN SFLAG MAY NOT PROPAGATE TO THE OUTPUT.
44+
*>
4245
*> \endverbatim
4346
*
4447
* Arguments:

CBLAS/examples/cblas_example1_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ int main ( )
6161
y, incy );
6262
/* Print y */
6363
for( i = 0; i < n; i++ )
64-
printf(" y%" CBLAS_IFMT " = %f\n", i, y[i]);
64+
printf(" y%d = %f\n", (int) i, y[i]);
6565
free(a);
6666
free(x);
6767
free(y);

CBLAS/src/cblas_cgbmv.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*/
88
#include <stdio.h>
99
#include <stdlib.h>
10+
#include <string.h>
11+
1012
#include "cblas.h"
1113
#include "cblas_f77.h"
1214
void API_SUFFIX(cblas_cgbmv)(const CBLAS_LAYOUT layout,
@@ -26,6 +28,7 @@ void API_SUFFIX(cblas_cgbmv)(const CBLAS_LAYOUT layout,
2628
F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
2729
F77_INT F77_KL=KL,F77_KU=KU;
2830
#else
31+
CBLAS_INT incx=incX;
2932
#define F77_M M
3033
#define F77_N N
3134
#define F77_lda lda
@@ -34,15 +37,19 @@ void API_SUFFIX(cblas_cgbmv)(const CBLAS_LAYOUT layout,
3437
#define F77_incX incx
3538
#define F77_incY incY
3639
#endif
37-
CBLAS_INT n=0, i=0, incx=incX;
38-
const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
40+
CBLAS_INT n=0, i=0;
41+
const float *xx= (const float *)X, *alp= (const float *)alpha, *bet = (const float *)beta;
3942
float ALPHA[2],BETA[2];
4043
CBLAS_INT tincY, tincx;
41-
float *x=(float *)X, *y=(float *)Y, *st=0, *tx=0;
44+
float *x, *y, *st=0, *tx=0;
4245
extern int CBLAS_CallFromC;
4346
extern int RowMajorStrg;
4447
RowMajorStrg = 0;
4548

49+
memcpy(&x, &X, sizeof(float*));
50+
memcpy(&y, &Y, sizeof(float*));
51+
52+
4653
CBLAS_CallFromC = 1;
4754
if (layout == CblasColMajor)
4855
{
@@ -125,7 +132,7 @@ void API_SUFFIX(cblas_cgbmv)(const CBLAS_LAYOUT layout,
125132
y -= n;
126133
}
127134
}
128-
else x = (float *) X;
135+
else memcpy(&x, &X, sizeof(float*));
129136

130137

131138
}

CBLAS/src/cblas_cgemv.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88
#include <stdio.h>
99
#include <stdlib.h>
10+
#include <string.h>
1011
#include "cblas.h"
1112
#include "cblas_f77.h"
1213
void API_SUFFIX(cblas_cgemv)(const CBLAS_LAYOUT layout,
@@ -31,18 +32,22 @@ void API_SUFFIX(cblas_cgemv)(const CBLAS_LAYOUT layout,
3132
#define F77_incY incY
3233
#endif
3334

34-
CBLAS_INT n=0, i=0, incx=incX;
35+
CBLAS_INT n=0, i=0;
3536
const float *xx= (const float *)X;
3637
float ALPHA[2],BETA[2];
3738
CBLAS_INT tincY, tincx;
38-
float *x=(float *)X, *y=(float *)Y, *st=0, *tx=0;
39-
const float *stx = x;
39+
float *x, *y, *st=0, *tx=0;
4040
extern int CBLAS_CallFromC;
4141
extern int RowMajorStrg;
4242
RowMajorStrg = 0;
4343

4444
CBLAS_CallFromC = 1;
4545

46+
memcpy(&x, &X, sizeof(float *));
47+
memcpy(&y, &Y, sizeof(float *));
48+
49+
const float *stx = x;
50+
4651
if (layout == CblasColMajor)
4752
{
4853
if (TransA == CblasNoTrans) TA = 'N';

CBLAS/src/cblas_cgerc.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*/
88
#include <stdio.h>
99
#include <stdlib.h>
10+
#include <string.h>
11+
1012
#include "cblas.h"
1113
#include "cblas_f77.h"
1214
void API_SUFFIX(cblas_cgerc)(const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N,
@@ -16,15 +18,18 @@ void API_SUFFIX(cblas_cgerc)(const CBLAS_LAYOUT layout, const CBLAS_INT M, const
1618
#ifdef F77_INT
1719
F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
1820
#else
21+
CBLAS_INT incy = incY;
1922
#define F77_M M
2023
#define F77_N N
2124
#define F77_incX incX
2225
#define F77_incY incy
2326
#define F77_lda lda
2427
#endif
2528

26-
CBLAS_INT n, i, tincy, incy=incY;
27-
float *y=(float *)Y, *yy=(float *)Y, *ty, *st;
29+
CBLAS_INT n, i, tincy;
30+
float *y, *yy, *ty, *st;
31+
memcpy(&y,&Y,sizeof(float*));
32+
memcpy(&yy,&Y,sizeof(float*));
2833

2934
extern int CBLAS_CallFromC;
3035
extern int RowMajorStrg;
@@ -70,7 +75,8 @@ void API_SUFFIX(cblas_cgerc)(const CBLAS_LAYOUT layout, const CBLAS_INT M, const
7075
incy = 1;
7176
#endif
7277
}
73-
else y = (float *) Y;
78+
else
79+
memcpy(&y,&Y,sizeof(float*));
7480

7581
F77_cgeru( &F77_N, &F77_M, alpha, y, &F77_incY, X, &F77_incX, A,
7682
&F77_lda);

0 commit comments

Comments
 (0)