Skip to content

Instantly share code, notes, and snippets.

@konabe
Created August 22, 2017 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save konabe/5f42bb66173ceaf3d60a74efd1485e37 to your computer and use it in GitHub Desktop.
Save konabe/5f42bb66173ceaf3d60a74efd1485e37 to your computer and use it in GitHub Desktop.
#include<stdio.h>
int main(void){
double a[4][4];
double b[4][4];
double c[4][4];
int i, j;
int n = 4;
double alpha = 1.0, beta = 0.0;
//aとbの初期化
DGEMM('T', 'T', &n, &n, &n, &alpha, a, &n, b, &n, &beta, c, &n);
for(i = 0; i < n; i++){
for(j = 0; j < n; j++){
printf("c[%d][%d] = %5.2f; ", i, j, c[j][i]);
}
printf("\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment