12int openblas_get_version(
int *major,
int *minor,
int *patch) {
15 void *self =
dlopen(NULL, RTLD_LAZY);
20 char *(*openblas_get_config)(void) = NULL;
21 *(
void **)(&openblas_get_config) =
dlsym(self,
"openblas_get_config");
24 if (!openblas_get_config) {
34 if (sscanf(openblas_get_config(),
"OpenBLAS %d.%d.%d", major, minor, patch) != 3) {
void * dlsym(void *__restrict __handle, const char *__restrict __name) __attribute__((__nothrow__
void * dlopen(const char *__file, int __mode) __attribute__((__nothrow__))