Skip to content

Commit

Permalink
remove useless code
Browse files Browse the repository at this point in the history
Signed-off-by: minmingzhu <minming.zhu@intel.com>
  • Loading branch information
minmingzhu committed Aug 7, 2023
1 parent c30f662 commit 5bba1fb
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 72 deletions.
15 changes: 0 additions & 15 deletions mllib-dal/src/main/native/OneDAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,6 @@ Java_com_intel_oap_mllib_OneDAL_00024_cNewCSRNumericTableDouble(
return (jlong)ret;
}

/*
* Class: com_intel_oap_mllib_OneDAL__
* Method: cNewDoubleArray
* Signature: (J)J
*/
// JNIEXPORT jlong JNICALL
// Java_com_intel_oap_mllib_OneDAL_00024_cNewDoubleArray(
// JNIEnv *env, jobject, jlong size) {
// std::cout << "create new native array size : " << size << std::endl;
// NativeArrayPtr arrayPtr(new double[size],
// [](double *ptr) { delete[] ptr; });
// saveArrayPtrToVector(arrayPtr);
// return (jlong)arrayPtr.get();
//}

/*
* Class: com_intel_oap_mllib_OneDAL__
* Method: cNewFloatArray
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 0 additions & 41 deletions mllib-dal/src/main/native/oneapi/dal/HomogenTableImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,47 +293,6 @@ JNIEXPORT jlong JNICALL Java_com_intel_oneapi_dal_table_HomogenTableImpl_lInit(
return (jlong)tablePtr.get();
}

/*
* Class: com_intel_oneapi_dal_table_HomogenTableImpl
* Method: Init
* Signature: (JJJIII)J
*/
JNIEXPORT jlong JNICALL Java_com_intel_oneapi_dal_table_HomogenTableImpl_dPtrInit(
JNIEnv *env, jobject, jlong cRowCount, jlong cColCount, jlong dataPtr, jint cLayout, jint computeDeviceOrdinal) {
printf("HomogenTable dPtrInit\n");
double *fData = reinterpret_cast<double *>(dataPtr);
if (fData == NULL) {
std::cout << "Error: unable to obtain critical array" << std::endl;
exit(-1);
}
const std::vector<sycl::event> dependencies = {};
HomogenTablePtr tablePtr;
ComputeDevice device = getComputeDeviceByOrdinal(computeDeviceOrdinal);
switch(device) {
case ComputeDevice::host:{
tablePtr = std::make_shared<homogen_table>(fData, cRowCount, cColCount,
detail::empty_delete<const double>(),
getDataLayout(cLayout));
break;
}
case ComputeDevice::cpu:
case ComputeDevice::gpu:{
auto queue = getQueue(device);
auto data = sycl::malloc_shared<double>(cRowCount * cColCount, queue);
queue.memcpy(data, fData, sizeof(double) * cRowCount * cColCount).wait();
tablePtr = std::make_shared<homogen_table>(queue, data, cRowCount, cColCount,
detail::make_default_delete<const double>(queue),
dependencies, getDataLayout(cLayout));
break;
}
default: {
deviceError();
}
}
saveHomogenTablePtrToVector(tablePtr);
return (jlong)tablePtr.get();
}

/*
* Class: com_intel_oneapi_dal_table_HomogenTableImpl
* Method: Init
Expand Down
2 changes: 0 additions & 2 deletions mllib-dal/src/main/scala/com/intel/oap/mllib/OneDAL.scala
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,6 @@ object OneDAL {
colIndices: Array[Long], rowOffsets: Array[Long],
nFeatures: Long, nVectors: Long): Long

@native def cNewDoubleArray(size: Long): Long

@native def cNewFloatArray(size: Long): Long

@native def cCopyArrayToNative(arrayAddr: Long,
Expand Down

0 comments on commit 5bba1fb

Please sign in to comment.