Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[Numpy] fix jni lint #14634

Merged
merged 1 commit into from
Apr 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -896,9 +896,9 @@ JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxExecutorReshape
(JNIEnv * env, jobject obj,
jint partialReshaping, jint allowUpSizing, jint devType, jint devId,
jobjectArray jmapKeys, jintArray jmapDevTypes, jintArray jmapDevIds,
jobjectArray jprovidedArgShapeNames, jintArray jprovidedArgShapeData, jintArray jprovidedArgShapeIdx,
jobject jrefInArgs, jobject jrefArgGrads, jobject jrefAuxStates,
jlong jsharedExec, jobject jrefOut) {
jobjectArray jprovidedArgShapeNames, jintArray jprovidedArgShapeData,
jintArray jprovidedArgShapeIdx, jobject jrefInArgs, jobject jrefArgGrads,
jobject jrefAuxStates, jlong jsharedExec, jobject jrefOut) {
CHECK(jmapKeys != NULL);
CHECK(jprovidedArgShapeNames != NULL);

Expand All @@ -922,7 +922,8 @@ JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxExecutorReshape
if (numProvidedArgShapes > 0) {
providedArgShapeNames = new const char*[numProvidedArgShapes];
for (int i = 0; i < numProvidedArgShapes; ++i) {
jstring jkey = reinterpret_cast<jstring>(env->GetObjectArrayElement(jprovidedArgShapeNames, i));
jstring jkey = reinterpret_cast<jstring>(
env->GetObjectArrayElement(jprovidedArgShapeNames, i));
providedArgShapeNames[i] = env->GetStringUTFChars(jkey, 0);
env->DeleteLocalRef(jkey);
}
Expand Down Expand Up @@ -1659,9 +1660,10 @@ int FillSymbolInferShape
return 0;
}

int SymbolInferShapeHelper(JNIEnv *env, jobject obj, jlong symbolPtr, jint jnumArgs, jobjectArray jkeys,
jintArray jargIndPtr, jintArray jargShapeData, jobject jinShapeData,
jobject joutShapeData, jobject jauxShapeData, jobject jcomplete, bool partial) {
int SymbolInferShapeHelper(JNIEnv *env, jobject obj, jlong symbolPtr, jint jnumArgs,
jobjectArray jkeys, jintArray jargIndPtr, jintArray jargShapeData,
jobject jinShapeData, jobject joutShapeData, jobject jauxShapeData,
jobject jcomplete, bool partial) {
const char **keys = NULL;
if (jkeys != NULL) {
keys = new const char *[jnumArgs];
Expand Down Expand Up @@ -2719,4 +2721,4 @@ JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSetIsNumpyCompatible
int ret = MXSetIsNumpyCompatible(isNpComp, &prev);
SetIntField(env, prevRef, prev);
return ret;
}
}