Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/cudecomp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,11 @@ cudecompResult_t cudecompGetShiftedRank(cudecompHandle_t handle, cudecompGridDes
if (dim < 0 || dim > 2) { THROW_INVALID_USAGE("dim argument out of range"); }
if (!shifted_rank) { THROW_INVALID_USAGE("shifted_rank argument cannot be null."); }

if (displacement == 0) {
*shifted_rank = handle->rank;
return CUDECOMP_RESULT_SUCCESS;
}

if (dim == axis) {
*shifted_rank = periodic ? handle->rank : -1;
return CUDECOMP_RESULT_SUCCESS;
Expand Down
Loading