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