[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55946] trunk/blender: Fluid threads: re-add an erratically forgotten line, fix typo, set default threadcount to logical threadcount of machine
jens verwiebe
info at jensverwiebe.de
Thu Apr 11 01:20:00 CEST 2013
Revision: 55946
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55946
Author: jensverwiebe
Date: 2013-04-10 23:19:57 +0000 (Wed, 10 Apr 2013)
Log Message:
-----------
Fluid threads: re-add an erratically forgotten line, fix typo, set default threadcount to logical threadcount of machine
Modified Paths:
--------------
trunk/blender/intern/elbeem/intern/simulation_object.cpp
trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c
Modified: trunk/blender/intern/elbeem/intern/simulation_object.cpp
===================================================================
--- trunk/blender/intern/elbeem/intern/simulation_object.cpp 2013-04-10 23:10:25 UTC (rev 55945)
+++ trunk/blender/intern/elbeem/intern/simulation_object.cpp 2013-04-10 23:19:57 UTC (rev 55946)
@@ -73,7 +73,7 @@
debMsgStd("SimulationObject",DM_MSG,"El'Beem Done!\n",10);
#if PARALLEL==1
omp_set_num_threads(omp_threadcache);
- printf("Resetting omp_threads to cached vakue %d \n", omp_threadcache);
+ printf("Resetting omp_threads to cached value %d \n", omp_threadcache);
#endif
}
@@ -185,6 +185,7 @@
mpLbm->setSmoothing(1.0 * mpElbeemSettings->surfaceSmoothing, 1.0 * mpElbeemSettings->surfaceSmoothing);
mpLbm->setIsoSubdivs(mpElbeemSettings->surfaceSubdivs);
#if PARALLEL==1
+ omp_threadcache = omp_get_max_threads();
omp_set_num_threads(mpElbeemSettings->threads);
printf("Setting omp_threads to usersetting %d \n", mpElbeemSettings->threads);
#endif
Modified: trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c 2013-04-10 23:10:25 UTC (rev 55945)
+++ trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c 2013-04-10 23:19:57 UTC (rev 55946)
@@ -46,6 +46,7 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
+#include "BLI_threads.h"
#include "BKE_main.h"
#include "BKE_fluidsim.h" /* ensure definitions here match */
@@ -75,7 +76,7 @@
fss->fmd = fluidmd;
fss->type = OB_FLUIDSIM_ENABLE;
- fss->threads = 4;
+ fss->threads = BLI_system_thread_count();
fss->show_advancedoptions = 0;
fss->resolutionxyz = 65;
More information about the Bf-blender-cvs
mailing list