From cd1e25f1bfed06bdba20936719e7fa3c83c3f364 Mon Sep 17 00:00:00 2001 From: Feiteng Date: Fri, 3 Jan 2025 14:23:37 +0800 Subject: [PATCH] Fix issues #1317 (#1319) --- k2/csrc/intersect_dense_pruned.cu | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/k2/csrc/intersect_dense_pruned.cu b/k2/csrc/intersect_dense_pruned.cu index c5befcc1c..9ace9928a 100644 --- a/k2/csrc/intersect_dense_pruned.cu +++ b/k2/csrc/intersect_dense_pruned.cu @@ -605,11 +605,11 @@ class MultiGraphDenseIntersectPruned { oarc_idx1 = oarc_idx01 - oarc_idx0x, oarc_idx01x_next = oshape_row_splits2[oarc_idx01 + 1]; - int32_t m = oshape_merge_map_data[oarc_idx0123], - t = m % (T + 2), // actually we won't get t == T or t == T + 1 - // here since those frames have no arcs. - arcs_idx012 = m / (T + 2); // arc_idx012 into FrameInfo::arcs on time t, - // index of the arc on that frame. + uint32_t m = oshape_merge_map_data[oarc_idx0123]; + int32_t t = m % uint32_t(T + 2), // actually we won't get t == T or t == T + 1 + // here since those frames have no arcs. + arcs_idx012 = m / uint32_t(T + 2); // arc_idx012 into FrameInfo::arcs on time t, + // index of the arc on that frame. K2_CHECK_EQ(t, oarc_idx1);