/* * This file is part of MXE. * See index.html for further information. * * taken from: https://gist.github.com/xianyi/5780018 */ #include "stdio.h" #include "stdlib.h" #include "sys/time.h" #include "time.h" extern void dgemm_(char*, char*, int*, int*,int*, double*, double*, int*, double*, int*, double*, double*, int*); int main(int argc, char* argv[]) { int i; printf("test!\n"); if(argc<4){ printf("Input Error\n"); return 1; } int m = atoi(argv[1]); int n = atoi(argv[2]); int k = atoi(argv[3]); int sizeofa = m * k; int sizeofb = k * n; int sizeofc = m * n; char ta = 'N'; char tb = 'N'; double alpha = 1.2; double beta = 0.001; struct timeval start,finish; double duration; double* A = (double*)malloc(sizeof(double) * sizeofa); double* B = (double*)malloc(sizeof(double) * sizeofb); double* C = (double*)malloc(sizeof(double) * sizeofc); srand((unsigned)time(NULL)); for (i=0; i