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
SparseConvNet
Commits
032d6fde
Commit
032d6fde
authored
Dec 10, 2017
by
Benjamin Thomas Graham
Browse files
Add offset to getSpatialLocations
parent
13bdf051
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
PyTorch/sparseconvnet/SCN/generic/Geometry/Metadata.cpp
PyTorch/sparseconvnet/SCN/generic/Geometry/Metadata.cpp
+3
-2
No files found.
PyTorch/sparseconvnet/SCN/generic/Geometry/Metadata.cpp
View file @
032d6fde
...
@@ -115,11 +115,12 @@ extern "C" void scn_D_(getSpatialLocations)(void **m, THLongTensor *spatialSize,
...
@@ -115,11 +115,12 @@ extern "C" void scn_D_(getSpatialLocations)(void **m, THLongTensor *spatialSize,
for
(
uInt
i
=
0
;
i
<
batchSize
;
i
++
)
{
for
(
uInt
i
=
0
;
i
<
batchSize
;
i
++
)
{
auto
mp
=
SGs
[
i
].
mp
;
auto
mp
=
SGs
[
i
].
mp
;
auto
offset
=
SGs
[
i
].
ctr
;
for
(
auto
it
=
mp
.
begin
();
it
!=
mp
.
end
();
++
it
)
{
for
(
auto
it
=
mp
.
begin
();
it
!=
mp
.
end
();
++
it
)
{
for
(
uInt
d
=
0
;
d
<
Dimension
;
++
d
)
{
for
(
uInt
d
=
0
;
d
<
Dimension
;
++
d
)
{
lD
[
it
->
second
*
(
Dimension
+
1
)
+
d
]
=
it
->
first
[
d
];
lD
[
(
it
->
second
+
offset
)
*
(
Dimension
+
1
)
+
d
]
=
it
->
first
[
d
];
}
}
lD
[
it
->
second
*
(
Dimension
+
1
)
+
Dimension
]
=
i
;
lD
[
(
it
->
second
+
offset
)
*
(
Dimension
+
1
)
+
Dimension
]
=
i
;
}
}
}
}
}
}
...
...
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