-
Notifications
You must be signed in to change notification settings - Fork 136
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
MSVC compatibility #54
base: master
Are you sure you want to change the base?
Conversation
src/unconstrained/de.cpp
Outdated
@@ -117,7 +117,11 @@ optim::internal::de_impl( | |||
#ifdef OPTIM_USE_OPENMP | |||
#pragma omp parallel for num_threads(omp_n_threads) firstprivate(rand_vec) | |||
#endif | |||
#ifdef _MSC_VER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an ugly code change. I suggest using an alias that depends on the build system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, this is done now (see commit (effb64) ).
src/unconstrained/de.cpp
Outdated
@@ -117,7 +117,11 @@ optim::internal::de_impl( | |||
#ifdef OPTIM_USE_OPENMP | |||
#pragma omp parallel for num_threads(omp_n_threads) firstprivate(rand_vec) | |||
#endif | |||
#ifdef _MSC_VER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an ugly code change. I suggest using an alias that depends on the build system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, this is done now (see commit (effb64) ).
Before proposing a code change like this, I suggest first opening an issue to discuss the proposal. In general, I have no need to support MSVC, and don't want to going forward, so I am not inclined to accept this (however minor the changes might be). |
MSVC support