Commit 646d1ab1 authored by Chao Ma's avatar Chao Ma Committed by Minjie Wang
Browse files

[Bugfix] 'const size_t' (aka 'const unsigned long') is ambiguous on MacOS (#363)

[Bugfix] 'const size_t' (aka 'const unsigned long') is ambiguous on MacOS
parent fea5579a
...@@ -24,7 +24,7 @@ DLManagedTensor* CreateTmpDLManagedTensor(const DGLArgValue& arg) { ...@@ -24,7 +24,7 @@ DLManagedTensor* CreateTmpDLManagedTensor(const DGLArgValue& arg) {
PackedFunc ConvertNDArrayVectorToPackedFunc(const std::vector<NDArray>& vec) { PackedFunc ConvertNDArrayVectorToPackedFunc(const std::vector<NDArray>& vec) {
auto body = [vec](DGLArgs args, DGLRetValue* rv) { auto body = [vec](DGLArgs args, DGLRetValue* rv) {
const size_t which = args[0]; const int which = args[0];
if (which >= vec.size()) { if (which >= vec.size()) {
LOG(FATAL) << "invalid choice"; LOG(FATAL) << "invalid choice";
} else { } else {
......
...@@ -70,7 +70,7 @@ PackedFunc ConvertSubgraphToPackedFunc(const Subgraph& sg) { ...@@ -70,7 +70,7 @@ PackedFunc ConvertSubgraphToPackedFunc(const Subgraph& sg) {
// Convert Sampled Subgraph structures to PackedFunc. // Convert Sampled Subgraph structures to PackedFunc.
PackedFunc ConvertSubgraphToPackedFunc(const std::vector<SampledSubgraph>& sg) { PackedFunc ConvertSubgraphToPackedFunc(const std::vector<SampledSubgraph>& sg) {
auto body = [sg] (DGLArgs args, DGLRetValue* rv) { auto body = [sg] (DGLArgs args, DGLRetValue* rv) {
const size_t which = args[0]; const int which = args[0];
if (which < sg.size()) { if (which < sg.size()) {
GraphInterface* gptr = sg[which].graph->Reset(); GraphInterface* gptr = sg[which].graph->Reset();
GraphHandle ghandle = gptr; GraphHandle ghandle = gptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment