Blind out affinity module if OpenMP is not used. Remove obsolete pthread switch.
This commit is contained in:
@@ -5,8 +5,8 @@ ifeq ($(ENABLE_OPENMP),true)
|
|||||||
OPENMP = -fopenmp
|
OPENMP = -fopenmp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS = -Ofast -ffreestanding -std=c99 -pthread $(OPENMP)
|
CFLAGS = -Ofast -ffreestanding -std=c99 $(OPENMP)
|
||||||
LFLAGS = -pthread $(OPENMP)
|
LFLAGS = $(OPENMP)
|
||||||
DEFINES = -D_GNU_SOURCE
|
DEFINES = -D_GNU_SOURCE
|
||||||
INCLUDES =
|
INCLUDES =
|
||||||
LIBS =
|
LIBS =
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ ifeq ($(ENABLE_OPENMP),true)
|
|||||||
OPENMP = -fopenmp
|
OPENMP = -fopenmp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS = -Ofast -ffreestanding -std=c99 -pthread $(OPENMP)
|
CFLAGS = -Ofast -ffreestanding -std=c99 $(OPENMP)
|
||||||
LFLAGS = -pthread $(OPENMP)
|
LFLAGS = $(OPENMP)
|
||||||
DEFINES = -D_GNU_SOURCE
|
DEFINES = -D_GNU_SOURCE
|
||||||
INCLUDES =
|
INCLUDES =
|
||||||
LIBS =
|
LIBS =
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ ifeq ($(ENABLE_OPENMP),true)
|
|||||||
OPENMP = -qopenmp
|
OPENMP = -qopenmp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS = -qopt-report -Ofast -xHost -std=c99 -ffreestanding -pthread $(OPENMP)
|
CFLAGS = -qopt-report -Ofast -xHost -std=c99 -ffreestanding $(OPENMP)
|
||||||
LFLAGS = -pthread $(OPENMP)
|
LFLAGS = $(OPENMP)
|
||||||
DEFINES = -D_GNU_SOURCE
|
DEFINES = -D_GNU_SOURCE
|
||||||
INCLUDES =
|
INCLUDES =
|
||||||
LIBS =
|
LIBS =
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
#ifdef _OPENMP
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
@@ -84,4 +85,5 @@ affinity_pinProcess(int processorId)
|
|||||||
CPU_SET(processorId, &cpuset);
|
CPU_SET(processorId, &cpuset);
|
||||||
sched_setaffinity(0, sizeof(cpu_set_t), &cpuset);
|
sched_setaffinity(0, sizeof(cpu_set_t), &cpuset);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /*__linux__*/
|
||||||
|
#endif /*_OPENMP*/
|
||||||
|
|||||||
Reference in New Issue
Block a user