".github/git@developer.sourcefind.cn:OpenDAS/dynamo.git" did not exist on "d1d2d7e3d2a056ef0f57cad0cc31c4c4227fac5e"
Commit 032d6fde authored by Benjamin Thomas Graham's avatar Benjamin Thomas Graham
Browse files

Add offset to getSpatialLocations

parent 13bdf051
...@@ -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;
} }
} }
} }
......
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