File: get_threading_model.c

package info (click to toggle)
openblas 0.3.21%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 55,584 kB
  • sloc: asm: 1,192,251; ansic: 327,031; fortran: 74,421; makefile: 13,364; sh: 4,649; perl: 4,414; python: 661; cpp: 244
file content (18 lines) | stat: -rw-r--r-- 391 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "../cblas.h"

int main() {
	int th_model = openblas_get_parallel();
	switch(th_model) {
		case OPENBLAS_SEQUENTIAL:
			printf("OpenBLAS is compiled sequentially.\n");
			break;
		case OPENBLAS_THREAD:
			printf("OpenBLAS is compiled using the normal threading model\n");
			break;
		case OPENBLAS_OPENMP:
			printf("OpenBLAS is compiled using OpenMP\n");
			break;
	}
	return 0;
}