OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
cblas_cgerc.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "cblas.h"
#include "cblas_f77.h"

Go to the source code of this file.

Macros

#define F77_M   M
#define F77_N   N
#define F77_incX   incX
#define F77_incY   incy
#define F77_lda   lda

Functions

void cblas_cgerc (const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, const void *alpha, const void *X, const CBLAS_INT incX, const void *Y, const CBLAS_INT incY, void *A, const CBLAS_INT lda)

Macro Definition Documentation

◆ F77_incX

#define F77_incX   incX

◆ F77_incY

#define F77_incY   incy

◆ F77_lda

#define F77_lda   lda

◆ F77_M

#define F77_M   M

◆ F77_N

#define F77_N   N

Function Documentation

◆ cblas_cgerc()

void cblas_cgerc ( const CBLAS_LAYOUT layout,
const CBLAS_INT M,
const CBLAS_INT N,
const void * alpha,
const void * X,
const CBLAS_INT incX,
const void * Y,
const CBLAS_INT incY,
void * A,
const CBLAS_INT lda )

Definition at line 12 of file cblas_cgerc.c.

15{
16#ifdef F77_INT
17 F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
18#else
19 #define F77_M M
20 #define F77_N N
21 #define F77_incX incX
22 #define F77_incY incy
23 #define F77_lda lda
24#endif
25
26 CBLAS_INT n, i, tincy, incy=incY;
27 float *y=(float *)Y, *yy=(float *)Y, *ty, *st;
28
29 extern int CBLAS_CallFromC;
30 extern int RowMajorStrg;
31 RowMajorStrg = 0;
32
34 if (layout == CblasColMajor)
35 {
36 F77_cgerc( &F77_M, &F77_N, alpha, X, &F77_incX, Y, &F77_incY, A,
37 &F77_lda);
38 } else if (layout == CblasRowMajor)
39 {
40 RowMajorStrg = 1;
41 if (N > 0)
42 {
43 n = N << 1;
44 y = malloc(n*sizeof(float));
45
46 ty = y;
47 if( incY > 0 ) {
48 i = incY << 1;
49 tincy = 2;
50 st= y+n;
51 } else {
52 i = incY *(-2);
53 tincy = -2;
54 st = y-2;
55 y +=(n-2);
56 }
57 do
58 {
59 *y = *yy;
60 y[1] = -yy[1];
61 y += tincy ;
62 yy += i;
63 }
64 while (y != st);
65 y = ty;
66
67 #ifdef F77_INT
68 F77_incY = 1;
69 #else
70 incy = 1;
71 #endif
72 }
73 else y = (float *) Y;
74
76 &F77_lda);
77 if(Y!=y)
78 free(y);
79
80 } else cblas_xerbla(1, "cblas_cgerc", "Illegal layout setting, %d\n", layout);
82 RowMajorStrg = 0;
83 return;
84}
void cblas_xerbla(CBLAS_INT p, const char *rout, const char *form,...)
@ CblasColMajor
Definition cblas.h:27
@ CblasRowMajor
Definition cblas.h:27
#define CBLAS_INT
Definition cblas.h:23
#define F77_incX
#define F77_incY
#define F77_N
#define F77_lda
#define F77_M
#define F77_cgeru(...)
Definition cblas_f77.h:271
#define F77_cgerc(...)
Definition cblas_f77.h:270
#define F77_INT
Definition cblas_f77.h:32
int CBLAS_CallFromC
int RowMajorStrg
#define alpha
Definition eval.h:35
#define N
n