Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
f0b61222
Unverified
Commit
f0b61222
authored
Jun 02, 2023
by
czkkkkkk
Committed by
GitHub
Jun 02, 2023
Browse files
[Graphbolt] Improve code quality (#5762)
parent
c9dfafe6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
graphbolt/src/shared_memory_utils.cc
graphbolt/src/shared_memory_utils.cc
+3
-6
No files found.
graphbolt/src/shared_memory_utils.cc
View file @
f0b61222
...
@@ -172,12 +172,9 @@ SharedMemoryTensors LoadTensorsFromSharedMemory(
...
@@ -172,12 +172,9 @@ SharedMemoryTensors LoadTensorsFromSharedMemory(
metas
.
push_back
({
false
,
{},
torch
::
ScalarType
::
Undefined
});
metas
.
push_back
({
false
,
{},
torch
::
ScalarType
::
Undefined
});
}
}
}
}
SharedMemoryPtr
data_shm
;
return
std
::
tuple_cat
(
std
::
vector
<
torch
::
optional
<
torch
::
Tensor
>>
ret_tensors
;
std
::
forward_as_tuple
(
std
::
move
(
meta_shm
)),
std
::
tie
(
data_shm
,
ret_tensors
)
=
LoadTensorsDataFromSharedMemory
(
name
+
"_data"
,
metas
));
LoadTensorsDataFromSharedMemory
(
name
+
"_data"
,
metas
);
return
std
::
make_tuple
(
std
::
move
(
meta_shm
),
std
::
move
(
data_shm
),
std
::
move
(
ret_tensors
));
}
}
}
// namespace sampling
}
// namespace sampling
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment