Created
January 22, 2013 01:29
-
-
Save arn-e/4591238 to your computer and use it in GitHub Desktop.
JNI array conversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JNIEXPORT jint JNICALL Java_ShortWeight_matrixWeight | |
(JNIEnv * env, jobject jobj, jintArray matrix_values, jint rows, jint columns) | |
{ | |
jint *matrix_ptr; | |
matrix_ptr = (*env)->GetIntArrayElements(env, matrix_values, NULL); | |
(*env)->ReleaseIntArrayElements(env, matrix_values, matrix_ptr, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment