diff --git a/inference/engine/include/BoltModel.h b/inference/engine/include/BoltModel.h index 3a34d9a1..676e75b3 100644 --- a/inference/engine/include/BoltModel.h +++ b/inference/engine/include/BoltModel.h @@ -110,7 +110,7 @@ JNIEXPORT void JNICALL BOLT_JNI_PREFIX(BoltModel_setRuntimeDeviceDynamicJNI)( * Method: setNumThreads * Signature: (I)V */ -JNIEXPORT void JNICALL BOLT_JNI_PREFIX(BoltModel_setNumThreads)(JNIEnv *, jint); +JNIEXPORT void JNICALL BOLT_JNI_PREFIX(BoltModel_setNumThreads)(JNIEnv *, jobject, jint); /* * Class: BoltModel diff --git a/inference/engine/src/BoltModel_Jni.cpp b/inference/engine/src/BoltModel_Jni.cpp index 32957760..ca254146 100644 --- a/inference/engine/src/BoltModel_Jni.cpp +++ b/inference/engine/src/BoltModel_Jni.cpp @@ -267,7 +267,7 @@ extern "C" JNIEXPORT jlong JNICALL BOLT_JNI_PREFIX(BoltModel_createModel)( const char *affinityPtr = env->GetStringUTFChars(affinity, JNI_FALSE); std::string affinity_str = (std::string)affinityPtr; AFFINITY_TYPE affinity_cur = str2AFFINITY_TYPE(affinity_str); - long modelAddr = (long long)CreateModel(modelPathPtr, affinity_cur, NULL); + long long modelAddr = (long long)CreateModel(modelPathPtr, affinity_cur, NULL); ModelHandleInfo *ihInfo = (ModelHandleInfo *)modelAddr; if (nullptr == ihInfo) { UNI_ERROR_LOG("Bolt instance not created\n"); @@ -285,7 +285,7 @@ extern "C" JNIEXPORT jlong JNICALL BOLT_JNI_PREFIX(BoltModel_cloneModel)( UNI_DEBUG_LOG("JNI %s...\n", __FUNCTION__); ModelHandle handle = (ModelHandle)modelAddr; ModelHandle cloneHandle = CloneModel(handle); - long ret = (long long)cloneHandle; + long long ret = (long long)cloneHandle; UNI_DEBUG_LOG("JNI %s end.\n", __FUNCTION__); return ret; } @@ -433,7 +433,7 @@ extern "C" JNIEXPORT void JNICALL BOLT_JNI_PREFIX(BoltModel_setRuntimeDeviceDyna UNI_DEBUG_LOG("JNI %s end.\n", __FUNCTION__); } -extern "C" JNIEXPORT void JNICALL BOLT_JNI_PREFIX(BoltModel_setNumThreads)(JNIEnv *env, jint threads) +extern "C" JNIEXPORT void JNICALL BOLT_JNI_PREFIX(BoltModel_setNumThreads)(JNIEnv *env, jobject, jint threads) { UNI_DEBUG_LOG("JNI %s...\n", __FUNCTION__); SetNumThreads(threads);