From ddcff9f0d2293a1eb3cd17bfa56272469c6fd2dd Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Fri, 2 Feb 2024 10:43:40 +0000 Subject: [PATCH] use accelerator regardless of cpu core count (#5759) Signed-off-by: si458 --- certoperations.js | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/certoperations.js b/certoperations.js index 40447ab0..571476d0 100644 --- a/certoperations.js +++ b/certoperations.js @@ -1407,20 +1407,15 @@ module.exports.CertificateOperations = function (parent) { // Perform any general operation obj.acceleratorPerformOperation = function (operation, data, tag, func) { - if (acceleratorTotalCount <= 1) { - // No accelerators available - require(program).processMessage({ action: operation, data: data, tag: tag, func: func }); + var acc = obj.getAccelerator(); + if (acc == null) { + // Add to pending accelerator workload + acceleratorPerformSignaturePushFuncCall++; + pendingAccelerator.push({ action: operation, data: data, tag: tag, func: func }); } else { - var acc = obj.getAccelerator(); - if (acc == null) { - // Add to pending accelerator workload - acceleratorPerformSignaturePushFuncCall++; - pendingAccelerator.push({ action: operation, data: data, tag: tag, func: func }); - } else { - // Send to accelerator now - acceleratorPerformSignatureRunFuncCall++; - acc.send(acc.x = { action: operation, data: data, tag: tag, func: func }); - } + // Send to accelerator now + acceleratorPerformSignatureRunFuncCall++; + acc.send(acc.x = { action: operation, data: data, tag: tag, func: func }); } };