Skip to content

Commit

Permalink
Re-enable XTENSOR_USE_XSIMD on all platforms, just not with explicit …
Browse files Browse the repository at this point in the history
…simd extensions. Some should be enabled by default anyway, and this lowers our risk of incompatibility.
  • Loading branch information
Ivorforce committed Sep 17, 2024
1 parent 65a518c commit dca2c2d
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,18 @@ Run the following command to download godot-cpp:

env = SConscript("godot-cpp/SConstruct", {"env": env, "customs": customs})

env.Append(CPPFLAGS=[
# See https://xtensor.readthedocs.io/en/latest/build-options.html
# See https://github.com/xtensor-stack/xsimd for supported list of simd extensions.
# Choosing more will make your program faster, but also more incompatible to older machines.
'-DXTENSOR_USE_XSIMD=1',
])

if env["platform"] in ["macos", "ios"]:
env.Append(CPPFLAGS=[
'-DXTENSOR_USE_XSIMD=1',
# See https://github.com/xtensor-stack/xsimd for supported list of simd.
# Choosing more will make your program faster, but also more incompatible to older machines.
'-msse2', '-msse3', '-msse4.1', '-msse4.2', '-mavx'
# Simd extensions
# For now let's keep it blank because some SIMD extensions should be available by default anyway.
# '-msse2', '-msse3', '-msse4.1', '-msse4.2', '-mavx'
])
if env["platform"] in ["windows"]:
env.Append(CPPFLAGS=[
Expand All @@ -83,7 +89,7 @@ if env["platform"] in ["windows"]:

# You can also use '-march=native' instead, which will enable everything your computer has.
# Keep in mind the resulting binary will likely not work on many other computers.
#env.Append(CPPFLAGS=['-DXTENSOR_USE_XSIMD=1', '-march=native'])
#env.Append(CPPFLAGS=['-march=native'])

env.Append(CPPPATH=["xtl/include", "xsimd/include", "xtensor/include"])

Expand Down

0 comments on commit dca2c2d

Please sign in to comment.