Created
October 11, 2013 06:59
-
-
Save xianyi/6930656 to your computer and use it in GitHub Desktop.
cc -static -o test_cblas_open test_cblas_dgemm.c -I /opt/OpenBLAS/include/ -L/opt/OpenBLAS/lib -lopenblas -lpthread -lgfortran
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cblas.h> | |
#include <stdio.h> | |
void main() | |
{ | |
int i=0; | |
double A[6] = {1.0,2.0,1.0,-3.0,4.0,-1.0}; | |
double B[6] = {1.0,2.0,1.0,-3.0,4.0,-1.0}; | |
double C[9] = {.5,.5,.5,.5,.5,.5,.5,.5,.5}; | |
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans,3,3,2,1,A, 3, B, 3,2,C,3); | |
for(i=0; i<9; i++) | |
printf("%lf ", C[i]); | |
printf("\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment