mirror of
https://github.com/opencv/opencv.git
synced 2025-01-19 06:53:50 +08:00
Restored Java bindings for CPU features management.
This commit is contained in:
parent
685a47b2e2
commit
05084aa63e
@ -122,10 +122,7 @@
|
||||
"}",
|
||||
"\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" : {
|
||||
|
@ -2059,4 +2059,12 @@ public class CoreTest extends OpenCVTestCase {
|
||||
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…
Reference in New Issue
Block a user