8000 BLD: enable SSE2 for 32-bit msvc 9 and 10 compilers by cgohlke · Pull Request #6440 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BLD: enable SSE2 for 32-bit msvc 9 and 10 compilers #6440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions numpy/distutils/msvccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import distutils.msvccompiler
from distutils.msvccompiler import *

from .system_info import platform_bits


class MSVCCompiler(distutils.msvccompiler.MSVCCompiler):
def __init__(self, verbose=0, dry_run=0, force=0):
Expand All @@ -15,3 +17,6 @@ def initialize(self, plat_name=None):
os.environ['lib'] = environ_lib + os.environ['lib']
if environ_include is not None:
os.environ['include'] = environ_include + os.environ['include']
if platform_bits == 32:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A note on why SSE2 is reguired would be helpful. Is there anyway to make this specific to compiler versions <= 1500?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msvc will use the sse2 code anyway, this just makes it consistent over all of numpy

self.compile_options += ['/arch:SSE2']
self.compile_options_debug += ['/arch:SSE2']
0