[Bf-blender-cvs] [d84bd56] master: OSX: Remove the apple/omp workaround for now, to better judge compiler differences

Jens Verwiebe noreply at git.blender.org
Sun Mar 30 17:39:10 CEST 2014


Commit: d84bd56ec5c8f480849992b14d65797d8a94c97e
Author: Jens Verwiebe
Date:   Sun Mar 30 17:38:33 2014 +0200
https://developer.blender.org/rBd84bd56ec5c8f480849992b14d65797d8a94c97e

OSX: Remove the apple/omp workaround for now, to better judge compiler differences

===================================================================

M	source/blender/editors/sculpt_paint/sculpt.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index d138e98..f4d16b8 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -104,20 +104,6 @@
 #include <omp.h>
 #endif
 
-#if defined(__APPLE__)
-#include <sys/sysctl.h>
-
-/* how many cores not counting HT aka pysical cores */
-int system_physical_thread_count(void); // declaration here for simplification
-int system_physical_thread_count(void)
-{
-	int pcount;
-	size_t pcount_len = sizeof(pcount);
-	sysctlbyname("hw.physicalcpu", &pcount, &pcount_len, NULL, 0);
-	return pcount;
-}
-#endif // __APPLE__
-
 void ED_sculpt_get_average_stroke(Object *ob, float stroke[3])
 {
 	if (ob->sculpt->last_stroke_valid && ob->sculpt->average_stroke_counter > 0) {
@@ -3793,16 +3779,11 @@ static void sculpt_omp_start(Sculpt *sd, SculptSession *ss)
 	 * Justification: Empirically I've found that two threads per
 	 * processor gives higher throughput. */
 	if (sd->flags & SCULPT_USE_OPENMP) {
-#if defined(__APPLE__)
-		cache->num_threads = system_physical_thread_count();
-#else
 		cache->num_threads = omp_get_num_procs();
-#endif
 	}
 	else {
 		cache->num_threads = 1;
 	}
-	omp_set_num_threads(cache->num_threads);
 #else
 	(void)sd;
 	cache->num_threads = 1;




More information about the Bf-blender-cvs mailing list