opencv/android/service/engine/jni/JNIWrapper/HardwareDetector_jni.cpp

25 lines
706 B
C++
Raw Normal View History

2012-06-21 22:50:05 +08:00
#include "HardwareDetector_jni.h"
#include "HardwareDetector.h"
#include <jni.h>
#include <string>
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_GetCpuID(JNIEnv* , jclass)
2012-06-21 22:50:05 +08:00
{
return GetCpuID();
}
JNIEXPORT jstring JNICALL Java_org_opencv_engine_HardwareDetector_GetPlatformName(JNIEnv* env, jclass)
2012-06-21 22:50:05 +08:00
{
std::string hardware_name = GetPlatformName();
return env->NewStringUTF(hardware_name.c_str());
}
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_GetProcessorCount(JNIEnv* , jclass)
2012-06-21 22:50:05 +08:00
{
return GetProcessorCount();
}
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_DetectKnownPlatforms(JNIEnv* , jclass)
2012-06-21 22:50:05 +08:00
{
return DetectKnownPlatforms();
}