From f6fea24ddc2dcc61d2b113d2873e83deec66913d Mon Sep 17 00:00:00 2001 From: MajidAbdelilah Date: Sat, 10 Jun 2023 22:18:50 +0100 Subject: [PATCH] fixing the broken build and optimizing the engine by 2.3 sec by using unused avx function namely computeBoundsOverlapMatrixAVX --- Physics3D/boundstree/boundsTree.h | 4 +++- Physics3D/geometry/triangleMeshCommon.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Physics3D/boundstree/boundsTree.h b/Physics3D/boundstree/boundsTree.h index c2875aba..1aadb9e3 100644 --- a/Physics3D/boundstree/boundsTree.h +++ b/Physics3D/boundstree/boundsTree.h @@ -455,12 +455,14 @@ void forEachColissionWithRecursive(const TreeTrunk& trunk, int trunkSize, Bounda } } } +//before = 0m17.620s; +//after = 0m15.310s; // expects a function of the form void(Boundable*, Boundable*) // Calls the given function for each pair of leaf nodes from the two trunks template void forEachColissionBetweenRecursive(const TreeTrunk& trunkA, int trunkASize, const TreeTrunk& trunkB, int trunkBSize, const Func& func) { - OverlapMatrix overlapBetween = SIMDHelper::computeBoundsOverlapMatrix(trunkA, trunkASize, trunkB, trunkBSize); + OverlapMatrix overlapBetween = SIMDHelper::computeBoundsOverlapMatrixAVX(trunkA, trunkASize, trunkB, trunkBSize); for(int a = 0; a < trunkASize; a++) { const TreeNodeRef& aNode = trunkA.subNodes[a]; diff --git a/Physics3D/geometry/triangleMeshCommon.h b/Physics3D/geometry/triangleMeshCommon.h index c551b60f..b37ae930 100644 --- a/Physics3D/geometry/triangleMeshCommon.h +++ b/Physics3D/geometry/triangleMeshCommon.h @@ -2,6 +2,7 @@ #include "triangleMesh.h" #include +#include namespace P3D { #ifdef _MSC_VER