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

Fix iterator advance for OpenMP #46

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ option(ENABLE_VTK "Configure VTK if available" FALSE)
option(ENABLE_CUDA_SINGLE "Use real*4 instead of real*8 for CUDA" FALSE)
option(ENABLE_DSMC "Enable DSCM module" FALSE)
option(ENABLE_USER "Enable basic user modules" ON)
option(ENABLE_SL_EXCEPTIONS "Enable *careful* Sturm-Liouville solutions" TRUE)
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
option(BUILD_DOCS "Build documentation" OFF)

Expand Down Expand Up @@ -146,6 +147,9 @@ endif()
if(FFTW_FOUND)
set(HAVE_FFTW TRUE)
endif()
if(ENABLE_SL_EXCEPTIONS)
set(SLEDGE_THROW TRUE)
endif()
if(PNG_FOUND AND ENABLE_PNG)
set(HAVE_LIBPNGPP TRUE)
endif()
Expand Down
2 changes: 1 addition & 1 deletion coefs/expMSSA.cc
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ namespace MSSA {
size_t map_size = mean.size();

auto u = mean.begin();
std::advance(u, thread_num);
for (int i=0; i<thread_num and u!=mean.end(); i++) u++;

for (int q=thread_num; q<map_size; q+=thread_count) {

Expand Down
3 changes: 3 additions & 0 deletions config_cmake.h_in
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/* True if DSMC is enabled */
#cmakedefine DSMC_ENABLED @DSMC_ENABLED@

/* Defined if ENABLE_SL_EXCEPTIONS is enabled */
#cmakedefine SLEDGE_THROW @ENABLE_SL_EXCEPTIONS@

/* "Have C++0x (set standard to cxx14 so legacy define)*/
#define HAVE_CXX0X

Expand Down
Loading
Loading