{"action":"created","issue":{"url":"https://api.github.com/repos/openexr/openexr/issues/280","repository_url":"https://api.github.com/repos/openexr/openexr","labels_url":"https://api.github.com/repos/openexr/openexr/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/openexr/openexr/issues/280/comments","events_url":"https://api.github.com/repos/openexr/openexr/issues/280/events","html_url":"https://github.com/openexr/openexr/pull/280","id":310829036,"number":280,"title":"Ilmbase enable cxx14, thread pool improvements","user":{"login":"kdt3rd","id":970144,"avatar_url":"https://avatars2.githubusercontent.com/u/970144?v=4","gravatar_id":"","url":"https://api.github.com/users/kdt3rd","html_url":"https://github.com/kdt3rd","followers_url":"https://api.github.com/users/kdt3rd/followers","following_url":"https://api.github.com/users/kdt3rd/following{/other_user}","gists_url":"https://api.github.com/users/kdt3rd/gists{/gist_id}","starred_url":"https://api.github.com/users/kdt3rd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdt3rd/subscriptions","organizations_url":"https://api.github.com/users/kdt3rd/orgs","repos_url":"https://api.github.com/users/kdt3rd/repos","events_url":"https://api.github.com/users/kdt3rd/events{/privacy}","received_events_url":"https://api.github.com/users/kdt3rd/received_events","type":"User","site_admin":false},"labels":[{"id":919041667,"url":"https://api.github.com/repos/openexr/openexr/labels/Pending%20merge%20to%20master","name":"Pending merge to master","color":"e1fcae","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-04-03T13:07:10Z","updated_at":"2018-05-02T08:31:00Z","closed_at":"2018-04-26T16:12:36Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/openexr/openexr/pulls/280","html_url":"https://github.com/openexr/openexr/pull/280","diff_url":"https://github.com/openexr/openexr/pull/280.diff","patch_url":"https://github.com/openexr/openexr/pull/280.patch"},"body":"Given VP18 is c++14, this is a few commits that enable c++14 in both cmake and autoconf, with a mechanism to disable and force IlmBase to continue to be strictly c++03 compliant.\r\n\r\nCredit / Other pull request notes: I started this to add the thread pool optimizations, which we would like. However, this should be considered an alternate implementation of pull request #55 , and I didn't realize it at the time, but provides similar c++11 related dynamic exception fixes as #93, #236, and #243 , so there might be conflicts there. Finally, this should make #170 obsolete with a more complete fix - it would appear @lgritz and I have similar perf traces for loading tiles... :)\r\n\r\nIncludes:\r\n- configure / cmake changes\r\n- dynamic exception macro to fix compile warnings in Imath\r\n- IlmThread enables use of std::thread, std::mutex\r\n- ThreadPool uses c++11 atomic, shared_ptr (when enabled) to provide lighter weight thread safe contention when appropriate, cleanups, and reducing lock contention in both scenarios\r\n- At the same time, an API to enable a user to replace the global thread pool is proposed, with no change to existing API, only additions. This is used internally to provide a minimal overhead, completely lock-free task processing when numThreads is set to 0 (which also happens to be the default for the OpenEXR library)\r\n- A std::condition_variable based Semaphore is available when in c++11 mode\r\n\r\nnote: I did NOT switch semaphore to only use std::condition_variable/std::mutex - only when semaphores are not available. low level semaphores tend to be faster when dispatching things in a sequence, as this pool tends to do, so blindly switching to condition_variable should only be done when semaphores are not available...\r\n"},"comment":{"url":"https://api.github.com/repos/openexr/openexr/issues/comments/385903320","html_url":"https://github.com/openexr/openexr/pull/280#issuecomment-385903320","issue_url":"https://api.github.com/repos/openexr/openexr/issues/280","id":385903320,"user":{"login":"ppearson","id":41575,"avatar_url":"https://avatars3.githubusercontent.com/u/41575?v=4","gravatar_id":"","url":"https://api.github.com/users/ppearson","html_url":"https://github.com/ppearson","followers_url":"https://api.github.com/users/ppearson/followers","following_url":"https://api.github.com/users/ppearson/following{/other_user}","gists_url":"https://api.github.com/users/ppearson/gists{/gist_id}","starred_url":"https://api.github.com/users/ppearson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppearson/subscriptions","organizations_url":"https://api.github.com/users/ppearson/orgs","repos_url":"https://api.github.com/users/ppearson/repos","events_url":"https://api.github.com/users/ppearson/events{/privacy}","received_events_url":"https://api.github.com/users/ppearson/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T08:31:00Z","updated_at":"2018-05-02T08:31:00Z","author_association":"NONE","body":"Is there a corresponding change missing from the OpenEXR part with this, or have I missed something?\r\n\r\nWith g++ 5.4 (system compiler), with latest head of develop, IlmBase builds fine with CMake, but then OpenEXR doesn't due to not having c++11 enabled within the OpenEXR build:\r\n\r\n`/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.`\r\n\r\nIf I hackily add:\r\n`SET(CMAKE_CXX_FLAGS_RELEASE \"-std=c++11\")`\r\nto OpenEXR's CMakeList.txt\r\n\r\nIt then builds fine and I can use it. Given there's the Force C++03 (which might be taken out?) that looks like it needs to be set if you *want* C++03, I'd assume C++11 would be the default with this (or at least the platform compiler default is?) so that OpenEXR can use IlmBase? Or should whatever's building OpenEXR externally set -std=c++11 within the OpenEXR build?"}}
{"actor":{"display_login":"ppearson"}}