mirror of
https://github.com/opencv/opencv.git
synced 2024-12-15 18:09:11 +08:00
5ffbcf1e16
Internal OpenCV library in OpenCV Manager support added; Unit tests improved, platform specific tests added, MIPS related tests added; Code refactoring done.
25 lines
715 B
C++
25 lines
715 B
C++
#include "HardwareDetector_jni.h"
|
|
#include "HardwareDetector.h"
|
|
#include <jni.h>
|
|
#include <string>
|
|
|
|
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_GetCpuID(JNIEnv* env, jclass)
|
|
{
|
|
return GetCpuID();
|
|
}
|
|
|
|
JNIEXPORT jstring JNICALL Java_org_opencv_engine_HardwareDetector_GetPlatformName(JNIEnv* env, jclass)
|
|
{
|
|
std::string hardware_name = GetPlatformName();
|
|
return env->NewStringUTF(hardware_name.c_str());
|
|
}
|
|
|
|
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_GetProcessorCount(JNIEnv* env, jclass)
|
|
{
|
|
return GetProcessorCount();
|
|
}
|
|
|
|
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_DetectKnownPlatforms(JNIEnv* env, jclass)
|
|
{
|
|
return DetectKnownPlatforms();
|
|
} |