Skip to content
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

sclang: changed some boost code to std #2091

Merged
merged 2 commits into from
May 20, 2016

Conversation

llloret
Copy link
Member

@llloret llloret commented May 16, 2016

This is to have windows MSVC compile on master again.

Because MSVC does not support some C++11 constructs that boost is using.

Note that we can probably streamline the code with some MACROs or
something, but I want to make it very explicit for now, to help with the
PR discussion.

Because MSVC does not support some C++11 constructs that boost is using.

Note that we can probably streamline the code with some MACROs or
something, but I want to make it very explicit for now, to help with the
PR discussion.
@llloret llloret mentioned this pull request May 16, 2016
@timblechmann
Copy link
Contributor

thanks for looking into this! it looks pretty good, just two comments:

  • i wouldn't use macros to 'simplify' the code, as executors (used in the boost::async codepath) are essentially coming from a c++17 proposal. so having it explicit is good, one can remove the platform-specifics once c++17 is out.
  • there is one potential problem with std::launch::async: it will create one thread per future, which might create a significant overhead (creating threads). the main point for using an executor-based approach is to use only as many threads as there are CPUs.

columnDescriptorsWithStats.push_back( std::move(future) );
}

calcRowStats(bigTable, filledSelectors, numClasses, numSelectors, 0, std::min( selectorsPerJob, numSelectors) );

for( auto & future : columnDescriptorsWithStats ) {
#ifdef _MSC_VER
future.wait();
Copy link
Contributor

Choose a reason for hiding this comment

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

please try not to mix tabs and spaces.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I will change the async to deferred.

Sorry about the space, I will fix that too, of course.

    columnDescriptorsWithStats.push_back( std::move(future) );
}

calcRowStats(bigTable, filledSelectors, numClasses, numSelectors, 0, std::min( selectorsPerJob, numSelectors) );

for( auto & future : columnDescriptorsWithStats ) {

+#ifdef MSC

@bagong
Copy link
Contributor

bagong commented May 16, 2016

Master now builds fine with VS 2013 with both boost 1.60 and 1.61. It think maybe after @timblechmann gave a lgtm this should go in as quickly as possible.

@bagong
Copy link
Contributor

bagong commented May 20, 2016

Windows fully back on master, yey! Thanks @llloret !

@bagong bagong merged commit ccb78e1 into supercollider:master May 20, 2016
@llloret llloret deleted the std_async_win branch May 20, 2016 09:32
@crucialfelix crucialfelix modified the milestone: 3.8 Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: build CMake build system os: Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants