mirror of
https://github.com/opencv/opencv.git
synced 2024-12-16 02:19:12 +08:00
da31e12fed
Some repo normalization problems fixed; Deprecated cmake keys removed; Warning fixed.
25 lines
706 B
C++
25 lines
706 B
C++
#include "HardwareDetector_jni.h"
|
|
#include "HardwareDetector.h"
|
|
#include <jni.h>
|
|
#include <string>
|
|
|
|
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_GetCpuID(JNIEnv* , 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* , jclass)
|
|
{
|
|
return GetProcessorCount();
|
|
}
|
|
|
|
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_DetectKnownPlatforms(JNIEnv* , jclass)
|
|
{
|
|
return DetectKnownPlatforms();
|
|
} |