From 33c0534f96527125ff24dd164d5947eb7dda16c3 Mon Sep 17 00:00:00 2001 From: Benjamin Redelings Date: Tue, 13 Feb 2024 15:28:29 -0500 Subject: [PATCH] Don't allocate memory for eigendecomposition under COMPUTATION_ACTION --- libhmsbeagle/CPU/BeagleCPUImpl.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libhmsbeagle/CPU/BeagleCPUImpl.hpp b/libhmsbeagle/CPU/BeagleCPUImpl.hpp index fd902e2f..c7ed3ead 100644 --- a/libhmsbeagle/CPU/BeagleCPUImpl.hpp +++ b/libhmsbeagle/CPU/BeagleCPUImpl.hpp @@ -335,7 +335,9 @@ int BeagleCPUImpl::createInstance(int tipCount, else kFlags |= BEAGLE_FLAG_THREADING_NONE; - if (kFlags & BEAGLE_FLAG_EIGEN_COMPLEX) + if (preferenceFlags & BEAGLE_FLAG_COMPUTATION_ACTION) + gEigenDecomposition = nullptr; + else if (kFlags & BEAGLE_FLAG_EIGEN_COMPLEX) gEigenDecomposition = new EigenDecompositionSquare(kEigenDecompCount, kStateCount,kCategoryCount,kFlags); else