Fixup braces lost in previous edit
This commit is contained in:
parent
7294fb1d9d
commit
d12b75a6c4
|
@ -778,10 +778,7 @@ static int initialized = 0;
|
||||||
void gotoblas_affinity_init(void) {
|
void gotoblas_affinity_init(void) {
|
||||||
|
|
||||||
int cpu, num_avail;
|
int cpu, num_avail;
|
||||||
#ifndef USE_OPENMP
|
|
||||||
cpu_set_t cpu_mask;
|
cpu_set_t cpu_mask;
|
||||||
#endif
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (initialized) return;
|
if (initialized) return;
|
||||||
|
|
||||||
|
@ -825,16 +822,18 @@ void gotoblas_affinity_init(void) {
|
||||||
|
|
||||||
common -> shmid = pshmid;
|
common -> shmid = pshmid;
|
||||||
|
|
||||||
if (common -> magic != SH_MAGIC)
|
if (common -> magic != SH_MAGIC) {
|
||||||
cpu_set_t *cpusetp;
|
cpu_set_t *cpusetp;
|
||||||
int nums;
|
int nums;
|
||||||
int ret;
|
int ret;
|
||||||
|
int i;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "Shared Memory Initialization.\n");
|
fprintf(stderr, "Shared Memory Initialization.\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//returns the number of processors which are currently online
|
//returns the number of processors which are currently online
|
||||||
|
|
||||||
nums = sysconf(_SC_NPROCESSORS_CONF);
|
nums = sysconf(_SC_NPROCESSORS_CONF);
|
||||||
|
|
||||||
#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 3)
|
#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 3)
|
||||||
|
@ -864,6 +863,7 @@ void gotoblas_affinity_init(void) {
|
||||||
for (i=0;i<nums;i++)
|
for (i=0;i<nums;i++)
|
||||||
if (CPU_ISSET(i,cpusetp)) n++;
|
if (CPU_ISSET(i,cpusetp)) n++;
|
||||||
common->num_procs = n;
|
common->num_procs = n;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
common->num_procs = CPU_COUNT(sizeof(cpu_set_t),cpusetp);
|
common->num_procs = CPU_COUNT(sizeof(cpu_set_t),cpusetp);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue