From 307863c80d3da4467e19b8962ee20bedce3895d2 Mon Sep 17 00:00:00 2001 From: Dan Strano Date: Wed, 14 Jun 2023 16:10:32 -0400 Subject: [PATCH] Fix serial builds --- include/qcircuit.hpp | 2 +- src/common/parallel_for.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/qcircuit.hpp b/include/qcircuit.hpp index 5958a4148..60a53bbc4 100644 --- a/include/qcircuit.hpp +++ b/include/qcircuit.hpp @@ -557,7 +557,7 @@ class QCircuit { #if ENABLE_ALU /** Add integer (without sign) */ - virtual void INC(bitCapInt toAdd, bitLenInt start, bitLenInt length); + void INC(bitCapInt toAdd, bitLenInt start, bitLenInt length); #endif }; diff --git a/src/common/parallel_for.cpp b/src/common/parallel_for.cpp index 87c1e56e6..280dcbdaf 100644 --- a/src/common/parallel_for.cpp +++ b/src/common/parallel_for.cpp @@ -39,7 +39,11 @@ ParallelFor::ParallelFor() #else : pStride((bitCapIntOcl)ONE_BCI << PSTRIDEPOW) #endif +#if ENABLE_PTHREAD , numCores(std::thread::hardware_concurrency()) +#else + , numCores(1) +#endif { const bitLenInt pStridePow = log2(pStride); const bitLenInt minStridePow = (numCores > 1U) ? (bitLenInt)pow2Ocl(log2(numCores - 1U)) : 0U;