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
torch-sparse
Commits
d86c6ff1
Commit
d86c6ff1
authored
Jul 14, 2021
by
rusty1s
Browse files
typos
parent
0802c75b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
csrc/cpu/hgt_sample_cpu.cpp
csrc/cpu/hgt_sample_cpu.cpp
+3
-5
No files found.
csrc/cpu/hgt_sample_cpu.cpp
View file @
d86c6ff1
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
#define MAX_NEIGHBORS 50
#define MAX_NEIGHBORS 50
using
namespace
std
;
edge_t
split
(
const
rel_t
&
rel_type
)
{
edge_t
split
(
const
rel_t
&
rel_type
)
{
vector
<
string
>
result
(
3
);
vector
<
string
>
result
(
3
);
int
start
=
0
,
end
;
int
start
=
0
,
end
;
...
@@ -17,8 +19,7 @@ edge_t split(const rel_t &rel_type) {
...
@@ -17,8 +19,7 @@ edge_t split(const rel_t &rel_type) {
void
update_budget_
(
void
update_budget_
(
unordered_map
<
node_t
,
unordered_map
<
int64_t
,
float
>>
*
budget_dict
,
unordered_map
<
node_t
,
unordered_map
<
int64_t
,
float
>>
*
budget_dict
,
const
node_t
&
node_type
,
//
const
node_t
&
node_type
,
const
vector
<
int64_t
>
&
samples
,
const
vector
<
int64_t
>
&
samples
,
const
unordered_map
<
node_t
,
unordered_map
<
int64_t
,
int64_t
>>
const
unordered_map
<
node_t
,
unordered_map
<
int64_t
,
int64_t
>>
&
to_local_node_dict
,
&
to_local_node_dict
,
const
unordered_map
<
rel_t
,
edge_t
>
&
to_edge_type
,
const
unordered_map
<
rel_t
,
edge_t
>
&
to_edge_type
,
...
@@ -132,10 +133,7 @@ hgt_sample_cpu(const c10::Dict<rel_t, torch::Tensor> &colptr_dict,
...
@@ -132,10 +133,7 @@ hgt_sample_cpu(const c10::Dict<rel_t, torch::Tensor> &colptr_dict,
to_local_node
[
v
]
=
i
;
to_local_node
[
v
]
=
i
;
}
}
}
}
b
=
steady_clock
::
now
();
std
::
cout
<<
"3="
<<
duration_cast
<
microseconds
>
(
b
-
a
).
count
()
<<
std
::
endl
;
a
=
steady_clock
::
now
();
// Update the budget based on the initial input set (line 3-5):
// Update the budget based on the initial input set (line 3-5):
for
(
const
auto
&
kv
:
nodes_dict
)
{
for
(
const
auto
&
kv
:
nodes_dict
)
{
const
auto
&
node_type
=
kv
.
first
;
const
auto
&
node_type
=
kv
.
first
;
...
...
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