Skip to content

Commit 51de5ec

Browse files
committed
fix a potential bug
1 parent 3c9dfc4 commit 51de5ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/op/descrpt_se_a_multi_device.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class DescrptSeAOp : public OpKernel {
268268
cudaErrcheck(cudaMemcpy(jlist, jlist_host, sizeof(int) * mesh_host[3], cudaMemcpyHostToDevice));
269269

270270
max_nbor_size = 1024;
271-
for(int ii = 0; ii < mesh_host[2] - 1; ii++) {
271+
for(int ii = 0; ii < mesh_host[2]; ii++) {
272272
max_nbor_size = (jrange_host[ii + 1] - jrange_host[ii]) > max_nbor_size ? (jrange_host[ii + 1] - jrange_host[ii]) : max_nbor_size;
273273
}
274274
}

source/op/descrpt_se_r_multi_device.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ class DescrptSeROp : public OpKernel {
257257
cudaErrcheck(cudaMemcpy(jlist, jlist_host, sizeof(int) * mesh_host[3], cudaMemcpyHostToDevice));
258258

259259
max_nbor_size = 1024;
260-
for(int ii = 0; ii < mesh_host[2] - 1; ii++) {
260+
for(int ii = 0; ii < mesh_host[2]; ii++) {
261261
max_nbor_size = (jrange_host[ii + 1] - jrange_host[ii]) > max_nbor_size ? (jrange_host[ii + 1] - jrange_host[ii]) : max_nbor_size;
262262
}
263263
}

0 commit comments

Comments
 (0)