Skip to content

Commit

Permalink
Fix build failures for Java
Browse files Browse the repository at this point in the history
by updating 'contiguous_split_result' to 'packed_table', involved by
the PR #7096 .

Error log snip:
[2021-02-04T08:09:05.604Z]      [exec] [ 92%] Building CUDA object CMakeFiles/cudfjni.dir/src/map_lookup.cu.o
[2021-02-04T08:09:05.764Z]      [exec] make[2]: *** [CMakeFiles/cudfjni.dir/build.make:225: CMakeFiles/cudfjni.dir/src/TableJni.cpp.o] Error 1
[2021-02-04T08:09:05.860Z]      [exec] In file included from /ansible-managed/jenkins-slave/slave4/workspace/spark/cudf18_nightly/java/src/main/native/src/NvcompJni.cpp:21:0:
[2021-02-04T08:09:05.861Z]      [exec] /ansible-managed/jenkins-slave/slave4/workspace/spark/cudf18_nightly/java/src/main/native/src/cudf_jni_apis.hpp:27:50: error: 'cudf::contiguous_split_result' has not been declared
[2021-02-04T08:09:05.861Z]      [exec]  jobject contiguous_table_from(JNIEnv *env, cudf::contiguous_split_result &split);
[2021-02-04T08:09:05.861Z]      [exec]                                                   ^~~~~~~~~~~~~~~~~~~~~~~
[2021-02-04T08:09:05.861Z]      [exec] In file included from /ansible-managed/jenkins-slave/slave4/workspace/spark/cudf18_nightly/java/src/main/native/src/ScalarJni.cpp:21:0:
[2021-02-04T08:09:05.861Z]      [exec] /ansible-managed/jenkins-slave/slave4/workspace/spark/cudf18_nightly/java/src/main/native/src/cudf_jni_apis.hpp:27:50: error: 'cudf::contiguous_split_result' has not been declared
[2021-02-04T08:09:05.861Z]      [exec]  jobject contiguous_table_from(JNIEnv *env, cudf::contiguous_split_result &split);

Signed-off-by: Liangcai Li <[email protected]>
  • Loading branch information
firestarman committed Feb 4, 2021
1 parent 4f87a59 commit 457f12a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions java/src/main/native/src/CudfJni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ static void release_contiguous_table_jni(JNIEnv *env) {
}
}

jobject contiguous_table_from(JNIEnv *env, cudf::contiguous_split_result &split) {
jlong address = reinterpret_cast<jlong>(split.all_data->data());
jlong size = static_cast<jlong>(split.all_data->size());
jlong buff_address = reinterpret_cast<jlong>(split.all_data.get());
jobject contiguous_table_from(JNIEnv *env, cudf::packed_table &split) {
jlong address = reinterpret_cast<jlong>(split.data.gpu_data->data());
jlong size = static_cast<jlong>(split.data.gpu_data->size());
jlong buff_address = reinterpret_cast<jlong>(split.data.gpu_data.get());
int num_columns = split.table.num_columns();
cudf::jni::native_jlongArray views(env, num_columns);
for (int i = 0; i < num_columns; i++) {
Expand All @@ -103,7 +103,7 @@ jobject contiguous_table_from(JNIEnv *env, cudf::contiguous_split_result &split)
views.get_jArray(), address, size, buff_address);

if (ret != nullptr) {
split.all_data.release();
split.data.gpu_data.release();
}
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion java/src/main/native/src/TableJni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1817,7 +1817,7 @@ JNIEXPORT jobjectArray JNICALL Java_ai_rapids_cudf_Table_contiguousSplit(JNIEnv
std::vector<cudf::size_type> indices(n_split_indices.data(),
n_split_indices.data() + n_split_indices.size());

std::vector<cudf::contiguous_split_result> result = cudf::contiguous_split(*n_table, indices);
std::vector<cudf::packed_table> result = cudf::contiguous_split(*n_table, indices);
cudf::jni::native_jobjectArray<jobject> n_result =
cudf::jni::contiguous_table_array(env, result.size());
for (int i = 0; i < result.size(); i++) {
Expand Down
2 changes: 1 addition & 1 deletion java/src/main/native/src/cudf_jni_apis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace cudf {
namespace jni {


jobject contiguous_table_from(JNIEnv *env, cudf::contiguous_split_result &split);
jobject contiguous_table_from(JNIEnv *env, cudf::packed_table &split);

native_jobjectArray<jobject> contiguous_table_array(JNIEnv *env, jsize length);

Expand Down

0 comments on commit 457f12a

Please sign in to comment.