upps my mistake it was a rounding mode on a simd operation in function void dgBroadPhaseNode::SetAABBSimd (const dgVector& minBox, const dgVector& maxBox)
it calculate teh min am max of an aabb here
- Code: Select all
{
simd_128 scale (DG_BROADPHASE_AABB_SCALE);
simd_128 invScale (DG_BROADPHASE_AABB_INV_SCALE);
simd_128 p0 ((simd_128&)minBox * scale);
simd_128 p1 ((simd_128&)maxBox * scale);
p0 = p0.Floor() * invScale;
p1 = ((p1 + dgCollisionConvex::m_one).Floor() * invScale)
P1.w is zero, however I add one and the round down but the roudn down on 1 is one, I nee dot and with a mask for triple like this
- Code: Select all
p1 = ((p1 + dgCollisionConvex::m_one).Floor() * invScale) & dgCollisionConvex::m_triplexMask;
wow it was good to found it because those are vert hard to fodn bug in moltotreading system.
I looks like some of the threads do not hae the proper round mode. It is exptarnge becaus eit is set whne eh mocro thread are created. by maybe Qt is messing with the CPU state.
anyway I do no liek to reliy on rounding in teh CPU flags so that is fixed now,
try again please.
Bird wrote:BTW, the access to the Thread pool is a great addition. I'm sure I'll find many uses for it.

aren the micro threads greats. they really make a big difference.
this is the biggest difference bewteen core 200 and core 300.
In core 200 I tryed to make every thong data paral;let, by requres a tremedondous amount of house keeping. and I codu never maintain a balance of teh load on each thread.
now with asycronous threads, a tread can have a big load and other can have a small load, and it does not matter because when the thread with a small
load complete it task if can alway teak anoet task from teh pendim job list.
this even yield better prefermance even when thre are more micro threads than cores in the systme, and i can even take advantge of hyprethread syetems which in core 200 run slower.
Also it does not slow down in systems that do not have the hardware, so it is safe to set 8 or 12 or 16 threads and even single core CPU will do equal or better that using just a single core.
There are two restrictions the thread pool is that you can no use it form inside a Newton update. but you cna use for anything else any where and let you take advange of the mout core in you system.
teh other is that the default Newton memoy manage is a chunk base dmanager and it is very hiogh preforemance. By design shuk allocation form teh same pool are no thread safe.
so calling netwon tool like the Mesh pool is no thread safe at thing time.
I could solve that two ways. first is by making a thread safe allocator, ( i do not like this option because it slow down the engine a lot since I use allocations for everythin and a lot)
or I can go over the mesheffect tool and explicytlly insert locks on each allocation. that sounds like and atractive option by it will take some time to do.
so for now you can not call the MeshEffect function tool from a Thread pool kernel.