Skip to content

Commit 95387ca

Browse files
committed
Remove references to OpenMP.
1 parent 2c91d7a commit 95387ca

5 files changed

Lines changed: 1 addition & 31 deletions

File tree

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ services:
4141

4242
before_install:
4343
- source .travis/before_install.sh
44-
- 'if [[ "$TRAVIS_OS_NAME" == "osx" && "$USE_OPENMP" == "true" ]]; then source .travis/install_openmp.sh; fi'
4544
- source .travis/install_python.sh
4645
- 'wget https://bootstrap.pypa.io/get-pip.py'
4746
- python get-pip.py

.travis/install_openmp.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ For the most part it's just::
5151
* Python 3.5+
5252
* Windows, Linux, or MacOS X 10.9+.
5353
* On Windows, requires the Visual C++ runtime 2015 or later.
54-
* On Linux, requires libsdl2 (2.0.5+) and libomp5 to run.
54+
* On Linux, requires libsdl2 (2.0.5+).
5555

5656
=========
5757
License

build_libtcod.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,6 @@ def fix_header(filepath: str) -> None:
307307
.split()
308308
)
309309

310-
# Can force the use of OpenMP with this variable.
311-
try:
312-
USE_OPENMP = eval(os.environ.get("USE_OPENMP", "False").title())
313-
except Exception:
314-
USE_OPENMP = False
315-
316310
tdl_build = os.environ.get("TDL_BUILD", "RELEASE").upper()
317311

318312
MSVC_CFLAGS = {"DEBUG": ["/Od"], "RELEASE": ["/GL", "/O2", "/GS-", "/wd4996"]}
@@ -332,21 +326,9 @@ def fix_header(filepath: str) -> None:
332326
if sys.platform == "win32" and "--compiler=mingw32" not in sys.argv:
333327
extra_compile_args.extend(MSVC_CFLAGS[tdl_build])
334328
extra_link_args.extend(MSVC_LDFLAGS[tdl_build])
335-
336-
if USE_OPENMP is None:
337-
USE_OPENMP = sys.version_info[:2] >= (3, 5)
338-
339-
if USE_OPENMP:
340-
extra_compile_args.append("/openmp")
341329
else:
342330
extra_compile_args.extend(GCC_CFLAGS[tdl_build])
343331
extra_link_args.extend(GCC_CFLAGS[tdl_build])
344-
if USE_OPENMP is None:
345-
USE_OPENMP = sys.platform != "darwin"
346-
347-
if USE_OPENMP:
348-
extra_compile_args.append("-fopenmp")
349-
extra_link_args.append("-fopenmp")
350332

351333
ffi = FFI()
352334
parse_sdl2.add_to_ffi(ffi, SDL2_INCLUDE)

tcod/noise.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ void NoiseSampleMeshGrid(
2020
const long len,
2121
const float* __restrict in,
2222
float* __restrict out) {
23-
#pragma omp parallel
2423
{
2524
long i;
26-
#pragma omp for schedule(static)
2725
for (i = 0; i < len; ++i) {
2826
int axis;
2927
float xyzw[TCOD_NOISE_MAX_DIMENSIONS];
@@ -64,11 +62,9 @@ void NoiseSampleOpenMeshGrid(
6462
const long* __restrict shape,
6563
const float* __restrict* __restrict ogrid_in,
6664
float* __restrict out) {
67-
#pragma omp parallel
6865
{
6966
long i;
7067
long len = GetSizeFromShape(ndim_in, shape);
71-
#pragma omp for schedule(static)
7268
for (i = 0; i < len; ++i) {
7369
out[i] = GetOpenMeshGridValue(noise, ndim_in, shape, ogrid_in, i);
7470
}

0 commit comments

Comments
 (0)