Skip to content

Commit 3606759

Browse files
committed
configure threads
1 parent 1f04b0a commit 3606759

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

reconstruction/ai/src/main/java/org/jlab/service/ai/DCDenoiseEngine.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class DCDenoiseEngine extends ReconstructionEngine {
2929

3030
final static String[] BANK_NAMES = {"DC::tot","DC::tdc"};
3131
final static String CONF_THRESHOLD = "threshold";
32+
final static String CONF_THREADS = "threads";
3233
final static int LAYERS = 36;
3334
final static int WIRES = 112;
3435

@@ -68,7 +69,8 @@ public boolean init() {
6869
.optProgress(new ProgressBar())
6970
.build();
7071
model = criteria.loadModel();
71-
predictors = new PredictorPool(64, model);
72+
int threads = Integer.parseInt(getEngineConfigString(CONF_THREADS,"64"));
73+
predictors = new PredictorPool(threads, model);
7274
return true;
7375
} catch (NullPointerException | MalformedModelException | IOException | ModelNotFoundException ex) {
7476
System.getLogger(DCDenoiseEngine.class.getName()).log(System.Logger.Level.ERROR, (String) null, ex);

0 commit comments

Comments
 (0)