Build: replace Blender specific DEBUG by standard NDEBUG #115774
@ -664,9 +664,5 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_
|
||||
#define BM_LOOP_RADIAL_MAX 10000
|
||||
#define BM_NGON_MAX 100000
|
||||
|
||||
/* setting zero so we can catch bugs in OpenMP/BMesh */
|
||||
#ifdef DEBUG
|
||||
# define BM_OMP_LIMIT 0
|
||||
#else
|
||||
# define BM_OMP_LIMIT 10000
|
||||
#endif
|
||||
/* Minimum number of elements before using threading. */
|
||||
#define BM_THREAD_LIMIT 10000
|
||||
|
@ -381,7 +381,7 @@ static void bm_mesh_select_mode_flush_vert_to_edge(BMesh *bm)
|
||||
|
||||
TaskParallelSettings settings;
|
||||
BLI_parallel_range_settings_defaults(&settings);
|
||||
settings.use_threading = bm->totedge >= BM_OMP_LIMIT;
|
||||
settings.use_threading = bm->totedge >= BM_THREAD_LIMIT;
|
||||
settings.userdata_chunk = &chunk_data;
|
||||
settings.userdata_chunk_size = sizeof(chunk_data);
|
||||
settings.func_reduce = bm_mesh_select_mode_flush_reduce_fn;
|
||||
@ -397,7 +397,7 @@ static void bm_mesh_select_mode_flush_edge_to_face(BMesh *bm)
|
||||
|
||||
TaskParallelSettings settings;
|
||||
BLI_parallel_range_settings_defaults(&settings);
|
||||
settings.use_threading = bm->totface >= BM_OMP_LIMIT;
|
||||
settings.use_threading = bm->totface >= BM_THREAD_LIMIT;
|
||||
settings.userdata_chunk = &chunk_data;
|
||||
settings.userdata_chunk_size = sizeof(chunk_data);
|
||||
settings.func_reduce = bm_mesh_select_mode_flush_reduce_fn;
|
||||
|
@ -212,7 +212,7 @@ static void bm_mesh_verts_calc_normals(BMesh *bm,
|
||||
|
||||
TaskParallelSettings settings;
|
||||
BLI_parallel_mempool_settings_defaults(&settings);
|
||||
settings.use_threading = bm->totvert >= BM_OMP_LIMIT;
|
||||
settings.use_threading = bm->totvert >= BM_THREAD_LIMIT;
|
||||
|
||||
if (vcos == nullptr) {
|
||||
BM_iter_parallel(bm, BM_VERTS_OF_MESH, bm_vert_calc_normals_cb, nullptr, &settings);
|
||||
@ -242,7 +242,7 @@ void BM_mesh_normals_update_ex(BMesh *bm, const BMeshNormalsUpdate_Params *param
|
||||
/* Calculate all face normals. */
|
||||
TaskParallelSettings settings;
|
||||
BLI_parallel_mempool_settings_defaults(&settings);
|
||||
settings.use_threading = bm->totedge >= BM_OMP_LIMIT;
|
||||
settings.use_threading = bm->totedge >= BM_THREAD_LIMIT;
|
||||
|
||||
BM_iter_parallel(bm, BM_FACES_OF_MESH, bm_face_calc_normals_cb, nullptr, &settings);
|
||||
}
|
||||
@ -1356,7 +1356,7 @@ static void bm_mesh_loops_calc_normals(BMesh *bm,
|
||||
const bool do_rebuild,
|
||||
const float split_angle_cos)
|
||||
{
|
||||
if (bm->totloop < BM_OMP_LIMIT) {
|
||||
if (bm->totloop < BM_THREAD_LIMIT) {
|
||||
bm_mesh_loops_calc_normals__single_threaded(bm,
|
||||
vcos,
|
||||
fnos,
|
||||
|
Loading…
Reference in New Issue
Block a user