Spaces:
Running
Running
zhouwg
commited on
whisper.android.java : fix returns in JNI (#1929)
Browse files
examples/whisper.android.java/app/src/main/jni/whisper/jni.c
CHANGED
|
@@ -245,6 +245,8 @@ Java_com_whispercpp_java_whisper_WhisperLib_benchMemcpy(JNIEnv *env, jobject thi
|
|
| 245 |
UNUSED(thiz);
|
| 246 |
const char *bench_ggml_memcpy = whisper_bench_memcpy_str(n_threads);
|
| 247 |
jstring string = (*env)->NewStringUTF(env, bench_ggml_memcpy);
|
|
|
|
|
|
|
| 248 |
}
|
| 249 |
|
| 250 |
JNIEXPORT jstring JNICALL
|
|
@@ -253,5 +255,7 @@ Java_com_whispercpp_java_whisper_WhisperLib_benchGgmlMulMat(JNIEnv *env, jobject
|
|
| 253 |
UNUSED(thiz);
|
| 254 |
const char *bench_ggml_mul_mat = whisper_bench_ggml_mul_mat_str(n_threads);
|
| 255 |
jstring string = (*env)->NewStringUTF(env, bench_ggml_mul_mat);
|
|
|
|
|
|
|
| 256 |
}
|
| 257 |
|
|
|
|
| 245 |
UNUSED(thiz);
|
| 246 |
const char *bench_ggml_memcpy = whisper_bench_memcpy_str(n_threads);
|
| 247 |
jstring string = (*env)->NewStringUTF(env, bench_ggml_memcpy);
|
| 248 |
+
|
| 249 |
+
return string;
|
| 250 |
}
|
| 251 |
|
| 252 |
JNIEXPORT jstring JNICALL
|
|
|
|
| 255 |
UNUSED(thiz);
|
| 256 |
const char *bench_ggml_mul_mat = whisper_bench_ggml_mul_mat_str(n_threads);
|
| 257 |
jstring string = (*env)->NewStringUTF(env, bench_ggml_mul_mat);
|
| 258 |
+
|
| 259 |
+
return string;
|
| 260 |
}
|
| 261 |
|