Skip to content

Commit 97bfd7d

Browse files
author
Gary Frost
committedMay 25, 2024
Hat sync with cuda changes
1 parent 9477fa0 commit 97bfd7d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed
 

‎hat/examples/violajones/src/java/violajones/ViolaJonesCompute.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -266,16 +266,16 @@ public static void findFeaturesKernel(KernelContext kc,
266266
stillLooksLikeAFace = isAFaceStage(kc.x, scale.scaleValue(), scale.invArea(), x, y, vnorm, integral, stage, cascade);
267267
}
268268

269-
// if (stillLooksLikeAFace) {
270-
// int index = resultTable.atomicResultTableCountInc();
271-
// if (index < resultTable.length()) {
272-
// ResultTable.Result result = resultTable.result(index);
273-
// result.x(x);
274-
// result.y(y);
275-
// result.width(w);
276-
// result.height(h);
277-
// }
278-
// }
269+
if (stillLooksLikeAFace) {
270+
int index = resultTable.atomicResultTableCountInc();
271+
if (index < resultTable.length()) {
272+
ResultTable.Result result = resultTable.result(index);
273+
result.x(x);
274+
result.y(y);
275+
result.width(w);
276+
result.height(h);
277+
}
278+
}
279279
}
280280
}
281281

@@ -315,7 +315,7 @@ public static void main(String[] args) throws IOException, ParserConfigurationEx
315315
HaarViewer harViz = new HaarViewer(accelerator, nasa1996, rgbImage, cascade, null, null);
316316

317317
//System.out.println("Compute units "+((NativeBackend)accelerator.backend).getGetMaxComputeUnits());
318-
for (int i = 0; i < 1; i++) {
318+
for (int i = 0; i < 10; i++) {
319319
resultTable.atomicResultTableCount(0);
320320
accelerator.compute(cc ->
321321
ViolaJonesCompute.compute(cc, cascade, nasa1996, rgbImage, resultTable)

0 commit comments

Comments
 (0)