diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-07-21 13:30:04 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-07-21 13:30:04 +0000 |
| commit | 1dc0534ee0f4e03687ae455cb838fd804fc30209 (patch) | |
| tree | bdd88b82c13fa2a329a055a44d1b05548e2f93aa | |
| parent | When snapping to handle lines (Ctrl+Alt node drag), snap (diff) | |
| download | inkscape-1dc0534ee0f4e03687ae455cb838fd804fc30209.tar.gz inkscape-1dc0534ee0f4e03687ae455cb838fd804fc30209.zip | |
Make OpenMP actually work on systems that use Autoconf.
(bzr r9637)
| -rw-r--r-- | configure.ac | 1 | ||||
| -rw-r--r-- | src/display/nr-filter-gaussian.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index e73e51218..832cfe23c 100644 --- a/configure.ac +++ b/configure.ac @@ -193,6 +193,7 @@ if test "x$openmp_ok" = "xyes"; then dnl We have it, now set up the flags CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS" AC_CHECK_HEADER(omp.h) + AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP]) fi dnl ****************************** diff --git a/src/display/nr-filter-gaussian.cpp b/src/display/nr-filter-gaussian.cpp index 9509eaef7..a45e838da 100644 --- a/src/display/nr-filter-gaussian.cpp +++ b/src/display/nr-filter-gaussian.cpp @@ -590,7 +590,8 @@ int FilterGaussian::render(FilterSlot &slot, FilterUnits const &units) double const deviation_y_org = _deviation_y * trans.expansionY(); int const PC = NR_PIXBLOCK_BPP(in); #if HAVE_OPENMP - int const NTHREADS = std::max(1,std::min(8, Inkscape::Preferences::get()->getInt("/options/threading/numthreads", omp_get_num_procs()))); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + int const NTHREADS = prefs->getIntLimited("/options/threading/numthreads", omp_get_num_procs(), 1, 256); #else int const NTHREADS = 1; #endif // HAVE_OPENMP |
