Skip to content

Commit

Permalink
fix wrong naming style in java wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed May 13, 2019
1 parent 1f0c031 commit 82ff1b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dnnlibrary/src/JavaWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ Java_me_daquexian_dnnlibrary_ModelBuilder_compile(JNIEnv *env,
jni_input_type *data = \
env->Get##JniInputType##ArrayElements(dataArrayObject, nullptr); \
\
uint32_t outputLen = model->GetSize(model->GetOutputs()[0]); \
cpp_output_type output[outputLen]; \
uint32_t output_len = model->GetSize(model->GetOutputs()[0]); \
cpp_output_type output[output_len]; \
model->SetOutputBuffer(0, output); \
\
model->Predict(std::vector{reinterpret_cast<cpp_input_type *>(data)}); \
\
jni_output_type##Array result = \
env->New##JniOutputType##Array(outputLen); \
env->New##JniOutputType##Array(output_len); \
env->Set##JniOutputType##ArrayRegion( \
result, 0, outputLen, \
result, 0, output_len, \
reinterpret_cast<jni_output_type *>(output)); \
\
return result; \
Expand Down

0 comments on commit 82ff1b5

Please sign in to comment.