Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- #include <cblas.h>
- #define N 1200
- void fill_matrices(int first[][N], int second[][N], int result[][N])
- {
- srand(time(NULL)); // randomize seed
- for (int i = 0; i < N; i++){
- for (int j = 0; j < N; j++){
- first[i][j] = rand() % 10;
- second[i][j] = rand() % 10;
- result[i][j] = 0;
- }
- }
- }
- int main()
- {
- int first[N][N], second[N][N], result[N][N];
- fill_matrices(first, second, result);
- cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, N, N, N, 1.0, first, N, second, N, 0.0, result, N);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement