use accelerator regardless of cpu core count (#5759)
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
bfec20ac81
commit
ddcff9f0d2
|
@ -1407,20 +1407,15 @@ module.exports.CertificateOperations = function (parent) {
|
||||||
|
|
||||||
// Perform any general operation
|
// Perform any general operation
|
||||||
obj.acceleratorPerformOperation = function (operation, data, tag, func) {
|
obj.acceleratorPerformOperation = function (operation, data, tag, func) {
|
||||||
if (acceleratorTotalCount <= 1) {
|
var acc = obj.getAccelerator();
|
||||||
// No accelerators available
|
if (acc == null) {
|
||||||
require(program).processMessage({ action: operation, data: data, tag: tag, func: func });
|
// Add to pending accelerator workload
|
||||||
|
acceleratorPerformSignaturePushFuncCall++;
|
||||||
|
pendingAccelerator.push({ action: operation, data: data, tag: tag, func: func });
|
||||||
} else {
|
} else {
|
||||||
var acc = obj.getAccelerator();
|
// Send to accelerator now
|
||||||
if (acc == null) {
|
acceleratorPerformSignatureRunFuncCall++;
|
||||||
// Add to pending accelerator workload
|
acc.send(acc.x = { action: operation, data: data, tag: tag, func: func });
|
||||||
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 });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue