#include <stddef.h>
#include "common.h"
+/*Set the number of threads on runtime.*/
+void openblas_set_num_threads(int num_threads);
+void goto_set_num_threads(int num_threads);
+
#define CBLAS_INDEX size_t
enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102};
int BLASFUNC(xerbla)(char *, blasint *info, blasint);
+void BLASFUNC(openblas_set_num_threads)(int *);
+
FLOATRET BLASFUNC(sdot) (blasint *, float *, blasint *, float *, blasint *);
FLOATRET BLASFUNC(sdsdot)(blasint *, float *, float *, blasint *, float *, blasint *);
TOPDIR = ../..
include ../../Makefile.system
-COMMONOBJS = memory.$(SUFFIX) xerbla.$(SUFFIX) c_abs.$(SUFFIX) z_abs.$(SUFFIX)
+COMMONOBJS = memory.$(SUFFIX) xerbla.$(SUFFIX) c_abs.$(SUFFIX) z_abs.$(SUFFIX) openblas_set_num_threads.$(SUFFIX)
COMMONOBJS += slamch.$(SUFFIX) slamc3.$(SUFFIX) dlamch.$(SUFFIX) dlamc3.$(SUFFIX)
ifdef SMP
-COMMONOBJS += blas_server.$(SUFFIX) divtable.$(SUFFIX) blasL1thread.$(SUFFIX) openblas_set_num_threads.$(SUFFIX)
+COMMONOBJS += blas_server.$(SUFFIX) divtable.$(SUFFIX) blasL1thread.$(SUFFIX)
ifndef NO_AFFINITY
COMMONOBJS += init.$(SUFFIX)
endif
/*****************************************************************************
-Copyright (c) 2011, Lab of Parallel Software and Computational Science,ICSAS
+Copyright (c) 2011,2012 Lab of Parallel Software and Computational Science,ISCAS
All rights reserved.
Redistribution and use in source and binary forms, with or without
#include "common.h"
#ifdef SMP_SERVER
-#ifdef OS_LINUX
extern void openblas_set_num_threads(int num_threads) ;
openblas_set_num_threads(*num_threads);
}
-#endif
+#else
+//Single thread
+
+void openblas_set_num_threads(int num_threads) {
+}
+
+void NAME(int* num_threads){
+
+}
#endif
zgemm3m, cgemm3m, zsymm3m, csymm3m, zhemm3m, chemm3m,
);
+@misc_no_underscore_objs = (
+ openblas_set_num_threads, goto_set_num_threads,
+ );
+
+@misc_underscore_objs = (
+ openblas_set_num_threads,
+ );
+
@lapackobjs = (
# These routines are provided by OpenBLAS.
sgesv, dgesv, cgesv, zgesv,
if ($ARGV[5] == 1) {
#NO_LAPACK=1
- @underscore_objs = (@blasobjs);
+ @underscore_objs = (@blasobjs, @misc_underscore_objs);
} elsif (-d "../lapack-3.1.1" || -d "../lapack-3.4.0" || -d "../lapack-3.4.1") {
- @underscore_objs = (@blasobjs, @lapackobjs, @lapackobjs2);
+ @underscore_objs = (@blasobjs, @lapackobjs, @lapackobjs2, @misc_underscore_objs);
} else {
- @underscore_objs = (@blasobjs, @lapackobjs);
+ @underscore_objs = (@blasobjs, @lapackobjs, @misc_underscore_objs);
}
if ($ARGV[3] == 1){ @underscore_objs = (@underscore_objs, @exblasobjs); };
if ($ARGV[1] eq "MIPS"){ @underscore_objs = (@underscore_objs, @gemm3mobjs); };
if ($ARGV[4] == 0) {
- @no_underscore_objs = (@cblasobjs);
+ @no_underscore_objs = (@cblasobjs, @misc_no_underscore_objs);
}else{
#NO_CBLAS=1
- @no_underscore_objs = ();
+ @no_underscore_objs = (@misc_no_underscore_objs);
}
if ($ARGV[6] == 1) {
#NO_LAPACKE=1