Skip to content

Commit

Permalink
fixed issues
Browse files Browse the repository at this point in the history
Signed-off-by: minmingzhu <[email protected]>
  • Loading branch information
minmingzhu committed Jul 28, 2023
1 parent 4b6dbe9 commit d8bd01a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
10 changes: 10 additions & 0 deletions mllib-dal/src/main/java/com/intel/oap/mllib/feature/PCAResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,21 @@ public class PCAResult {
public long pcNumericTable;
public long explainedVarianceNumericTable;

public long getExplainedVarianceNumericTable() {
return explainedVarianceNumericTable;
}

public void setExplainedVarianceNumericTable(long explainedVarianceNumericTable) {
this.explainedVarianceNumericTable = explainedVarianceNumericTable;
}

public long getPcNumericTable() {
return pcNumericTable;
}

public void setPcNumericTable(long pcNumericTable) {
this.pcNumericTable = pcNumericTable;
}


}
7 changes: 6 additions & 1 deletion mllib-dal/src/main/native/OneCCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static int fill_local_host_ip() {
continue;
if (strstr(ifa->ifa_name, iface_name) == NULL) {
family = ifa->ifa_addr->sa_family;
if (family == AF_INET) {
if (family == AF_INET || family == AF_INET6) {
memset(local_ip, 0, CCL_IP_LEN);
int res = getnameinfo(
ifa->ifa_addr,
Expand All @@ -161,6 +161,11 @@ static int fill_local_host_ip() {
return -1;
}
local_host_ips.push_back(local_ip);
} else {
std::cerr
<< "OneCCL (native): can't find interface to get host IP"
<< std::endl;
return -1;
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions mllib-dal/src/main/native/service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ void printNumericTable(NumericTable *dataTable, const char *message = "",
nPrintedRows, nCols, message, interval);
dataTable->releaseBlockOfRows(block);
} else {
try {
PackedArrayNumericTableIface *packedTable =
dynamic_cast<PackedArrayNumericTableIface *>(dataTable);
PackedArrayNumericTableIface *packedTable =
dynamic_cast<PackedArrayNumericTableIface *>(dataTable);
if (packedTable) {
packedTable->getPackedArray(readOnly, block);
if (isLower(layout)) {
printLowerArray<DAAL_DATA_TYPE>(
Expand All @@ -423,7 +423,7 @@ void printNumericTable(NumericTable *dataTable, const char *message = "",
nCols, message, interval);
}
packedTable->releasePackedArray(block);
} catch (const std::bad_cast &e) {
} else {
std::cout
<< "Dynamic cast to PackedArrayNumericTableIface* failed: "
<< e.what() << std::endl;
Expand Down

0 comments on commit d8bd01a

Please sign in to comment.