LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
cblas_example2_64.c
Go to the documentation of this file.
1/* cblas_example2.c */
2
3#include <stdio.h>
4#include <stdlib.h>
5#include "cblas_64.h"
6#define CBLAS_API64
7#define F77_INT int64_t
8#include "cblas_f77.h"
9
10#define INVALID -1
11
12int main (int argc, char **argv )
13{
14 int64_t rout=-1,info=0,m,n,k,lda,ldb,ldc;
15 double A[2] = {0.0,0.0},
16 B[2] = {0.0,0.0},
17 C[2] = {0.0,0.0},
18 ALPHA=0.0, BETA=0.0;
19
20 if (argc > 2){
21 rout = atoi(argv[1]);
22 info = atoi(argv[2]);
23 }
24
25 if (rout == 1) {
26 if (info==0) {
27 printf("Checking if cblas_dgemm fails on parameter 4\n");
29 ALPHA, A, 1, B, 1, BETA, C, 1 );
30 }
31 if (info==1) {
32 printf("Checking if cblas_dgemm fails on parameter 5\n");
34 ALPHA, A, 1, B, 1, BETA, C, 1 );
35 }
36 if (info==2) {
37 printf("Checking if cblas_dgemm fails on parameter 9\n");
39 ALPHA, A, 1, B, 1, BETA, C, 2 );
40 }
41 if (info==3) {
42 printf("Checking if cblas_dgemm fails on parameter 11\n");
44 ALPHA, A, 1, B, 1, BETA, C, 1 );
45 }
46 } else {
47 if (info==0) {
48 printf("Checking if F77_dgemm fails on parameter 3\n");
49 m=INVALID; n=0; k=0; lda=1; ldb=1; ldc=1;
50 F77_dgemm( "T", "N", &m, &n, &k,
51 &ALPHA, A, &lda, B, &ldb, &BETA, C, &ldc );
52 }
53 if (info==1) {
54 m=0; n=INVALID; k=0; lda=1; ldb=1; ldc=1;
55 printf("Checking if F77_dgemm fails on parameter 4\n");
56 F77_dgemm( "N", "T", &m, &n, &k,
57 &ALPHA, A, &lda, B, &ldb, &BETA, C, &ldc );
58 }
59 if (info==2) {
60 printf("Checking if F77_dgemm fails on parameter 8\n");
61 m=2; n=0; k=0; lda=1; ldb=1; ldc=2;
62 F77_dgemm( "N", "N" , &m, &n, &k,
63 &ALPHA, A, &lda, B, &ldb, &BETA, C, &ldc );
64 }
65 if (info==3) {
66 printf("Checking if F77_dgemm fails on parameter 10\n");
67 m=0; n=0; k=2; lda=1; ldb=1; ldc=1;
68 F77_dgemm( "N", "N" , &m, &n, &k,
69 &ALPHA, A, &lda, B, &ldb, &BETA, C, &ldc );
70 }
71 }
72
73 return 0;
74}
@ CblasNoTrans
Definition cblas.h:40
@ CblasTrans
Definition cblas.h:40
@ CblasRowMajor
Definition cblas.h:39
void cblas_dgemm_64(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA, CBLAS_TRANSPOSE TransB, const int64_t M, const int64_t N, const int64_t K, const double alpha, const double *A, const int64_t lda, const double *B, const int64_t ldb, const double beta, double *C, const int64_t ldc)
int main()
#define INVALID
#define F77_dgemm(...)
Definition cblas_f77.h:396