Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
one
spconv
Commits
6e727bcd
Commit
6e727bcd
authored
May 26, 2019
by
traveller59
Browse files
small cpu bug fix
parent
fa75f6d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/spconv/indice.cc
src/spconv/indice.cc
+7
-4
No files found.
src/spconv/indice.cc
View file @
6e727bcd
...
...
@@ -223,13 +223,15 @@ Index getIndicePairsSubM(tv::TensorView<const Index> indicesIn,
std
::
vector
<
Index
>
validPoints_
(
kernelVolume
*
(
NDim
+
1
));
Index
*
validPoints
=
validPoints_
.
data
();
Index
*
pointPtr
=
nullptr
;
Index
i
ndex
=
0
;
tsl
::
robin_map
<
Index
,
I
ndex
>
hash
;
for
(
int
j
=
0
;
j
<
numActIn
;
++
j
)
{
Index
index
=
0
;
index
=
tv
::
rowArrayIdx
<
Index
,
NDim
>
(
indicesIn
.
data
()
+
j
*
(
NDim
+
1
)
+
1
,
outSpatialShape
)
+
spatialVolume
*
indicesIn
(
j
,
0
);
gridsOut
[
index
]
=
j
;
hash
[
index
]
=
j
;
}
Index
index
=
0
;
for
(
int
j
=
0
;
j
<
numActIn
;
++
j
)
{
numValidPoints
=
getValidOutPos
<
Index
,
NDim
>
(
indicesIn
.
data
()
+
j
*
(
NDim
+
1
)
+
1
,
kernelSize
,
stride
,
padding
,
...
...
@@ -239,9 +241,10 @@ Index getIndicePairsSubM(tv::TensorView<const Index> indicesIn,
auto
offset
=
pointPtr
[
NDim
];
index
=
tv
::
rowArrayIdx
<
Index
,
NDim
>
(
pointPtr
,
outSpatialShape
)
+
spatialVolume
*
indicesIn
(
j
,
0
);
if
(
gridsOut
[
index
]
>
-
1
)
{
auto
iter
=
hash
.
find
(
index
);
if
(
iter
!=
hash
.
end
())
{
indicePairs
(
offset
,
0
,
indiceNum
[
offset
])
=
j
;
indicePairs
(
offset
,
1
,
indiceNum
[
offset
]
++
)
=
gridsOut
[
index
]
;
indicePairs
(
offset
,
1
,
indiceNum
[
offset
]
++
)
=
iter
->
second
;
}
}
}
...
...
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