Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
revans2 committed Oct 5, 2023
1 parent f9afbef commit dbcdbe2
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions java/src/main/native/src/DataSourceHelperJni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ bool cache_data_source_jni(JNIEnv *env) {
return false;
}

hostReadBuff_method =
env->GetMethodID(cls, "hostReadBuff", "(JJ)[J");
hostReadBuff_method = env->GetMethodID(cls, "hostReadBuff", "(JJ)[J");
if (hostReadBuff_method == nullptr) {
return false;
}

onHostBufferDone_method =
env->GetMethodID(cls, "onHostBufferDone", "(J)V");
onHostBufferDone_method = env->GetMethodID(cls, "onHostBufferDone", "(J)V");
if (onHostBufferDone_method == nullptr) {
return false;
}
Expand Down Expand Up @@ -134,8 +132,8 @@ class jni_datasource : public cudf::io::datasource {
throw cudf::jni::jni_exception("Could not load JNIEnv");
}

jlongArray jbuffer_info = static_cast<jlongArray>(env->CallObjectMethod(
this->ds, hostReadBuff_method, offset, size));
jlongArray jbuffer_info =
static_cast<jlongArray>(env->CallObjectMethod(this->ds, hostReadBuff_method, offset, size));
if (env->ExceptionOccurred()) {
throw cudf::jni::jni_exception("Java exception in hostRead");
}
Expand All @@ -156,8 +154,8 @@ class jni_datasource : public cudf::io::datasource {
throw cudf::jni::jni_exception("Could not load JNIEnv");
}

jlong amount_read = env->CallLongMethod(this->ds, hostRead_method, offset,
size, reinterpret_cast<jlong>(dst));
jlong amount_read =
env->CallLongMethod(this->ds, hostRead_method, offset, size, reinterpret_cast<jlong>(dst));
if (env->ExceptionOccurred()) {
throw cudf::jni::jni_exception("Java exception in hostRead");
}
Expand All @@ -179,9 +177,9 @@ class jni_datasource : public cudf::io::datasource {
throw cudf::jni::jni_exception("Could not load JNIEnv");
}

jlong amount_read = env->CallLongMethod(this->ds, deviceRead_method,
offset, size, reinterpret_cast<jlong>(dst),
reinterpret_cast<jlong>(stream.value()));
jlong amount_read =
env->CallLongMethod(this->ds, deviceRead_method, offset, size, reinterpret_cast<jlong>(dst),
reinterpret_cast<jlong>(stream.value()));
if (env->ExceptionOccurred()) {
throw cudf::jni::jni_exception("Java exception in deviceRead");
}
Expand Down

0 comments on commit dbcdbe2

Please sign in to comment.