Created
July 20, 2023 20:12
-
-
Save thrasibule/394425dee40b2b852513c47f1b737ad6 to your computer and use it in GitHub Desktop.
blas test for bug #4017
This file contains 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 <omp.h> | |
#include <stdio.h> | |
#define DATASIZE 100 | |
double A[DATASIZE*DATASIZE]; | |
double B[DATASIZE*DATASIZE]; | |
double C[DATASIZE*DATASIZE]; | |
void main() | |
{ | |
printf("%d\n", omp_get_max_threads()); | |
cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, | |
DATASIZE, DATASIZE, DATASIZE, 1, A, DATASIZE, B, DATASIZE, 0, C, DATASIZE); | |
printf("%d\n", omp_get_max_threads()); | |
omp_set_num_threads(4); | |
cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, | |
DATASIZE, DATASIZE, DATASIZE, 1, A, DATASIZE, B, DATASIZE, 0, C, DATASIZE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment