Restored Java bindings for CPU features management.

pull/23629/head
Alexander Smorkalov 2 years ago
parent 685a47b2e2
commit 05084aa63e
  1. 5
      modules/core/misc/java/gen_dict.json
  2. 8
      modules/core/misc/java/test/CoreTest.java

@ -122,10 +122,7 @@
"}", "}",
"\n" "\n"
] ]
}, }
"checkHardwareSupport" : {"j_code" : [""], "jn_code" : [""], "cpp_code" : [""] },
"setUseOptimized" : {"j_code" : [""], "jn_code" : [""], "cpp_code" : [""] },
"useOptimized" : {"j_code" : [""], "jn_code" : [""], "cpp_code" : [""] }
} }
}, },
"func_arg_fix" : { "func_arg_fix" : {

@ -2059,4 +2059,12 @@ public class CoreTest extends OpenCVTestCase {
assertEquals(Core.VERSION, Core.getVersionString()); assertEquals(Core.VERSION, Core.getVersionString());
} }
public void testHardwareOptions() {
Core.checkHardwareSupport(0);
boolean original_status = Core.useOptimized();
Core.setUseOptimized(!original_status);
assertEquals(!original_status, Core.useOptimized());
Core.setUseOptimized(original_status);
assertEquals(original_status, Core.useOptimized());
}
} }

Loading…
Cancel
Save