Last active
June 4, 2022 18:33
-
-
Save danieldk/b4f275e715fb8131d6fe5435e9f29a98 to your computer and use it in GitHub Desktop.
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 <stdlib.h> | |
#include <cblas.h> | |
int const M = 7; | |
int const K = 1026; | |
int const N = 1026; | |
int main() { | |
float const *A = (float *) calloc(M * K, sizeof(float)); | |
float const *B = (float *) calloc(K * N, sizeof(float)); | |
float *C = (float *) malloc(M * N * sizeof(float)); | |
cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, | |
M, N, K, 1.0, A, K, B, N, 0.0, C, N); | |
free((void *) A); | |
free((void *) B); | |
free((void *) C); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment