Skip to content

Commit

Permalink
RVV: ShuffleChannel, make C906 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
thelastlin committed Aug 30, 2023
1 parent 33a5741 commit be5666d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/layer/riscv/shufflechannel_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ int ShuffleChannel_riscv::forward(const Mat& bottom_blob, Mat& top_blob, const O
// C906 128 bits
for (int i = 0; i < _group; i++)
{
index_c906[0 + i * 4] = i + 0 * _group;
index_c906[1 + i * 4] = i + 1 * _group;
index_c906[2 + i * 4] = i + 2 * _group;
index_c906[3 + i * 4] = i + 3 * _group;
index_c906[i + _group * 0] = 0 + i * 4;
index_c906[i + _group * 1] = 1 + i * 4;
index_c906[i + _group * 2] = 2 + i * 4;
index_c906[i + _group * 3] = 3 + i * 4;
}
#else
create_bitmask(_group, bitmask, packn);
Expand Down Expand Up @@ -827,14 +827,14 @@ int ShuffleChannel_riscv::forward_bf16s_fp16s(const Mat& bottom_blob, Mat& top_b
// C906 128 bits, pack8
for (int i = 0; i < _group; i++)
{
index_c906[0 + i * 8] = i + 0 * _group;
index_c906[1 + i * 8] = i + 1 * _group;
index_c906[2 + i * 8] = i + 2 * _group;
index_c906[3 + i * 8] = i + 3 * _group;
index_c906[4 + i * 8] = i + 4 * _group;
index_c906[5 + i * 8] = i + 5 * _group;
index_c906[6 + i * 8] = i + 6 * _group;
index_c906[7 + i * 8] = i + 7 * _group;
index_c906[i + _group * 0] = 0 + i * 8;
index_c906[i + _group * 1] = 1 + i * 8;
index_c906[i + _group * 2] = 2 + i * 8;
index_c906[i + _group * 3] = 3 + i * 8;
index_c906[i + _group * 4] = 4 + i * 8;
index_c906[i + _group * 5] = 5 + i * 8;
index_c906[i + _group * 6] = 6 + i * 8;
index_c906[i + _group * 7] = 7 + i * 8;
}
#else
create_bitmask(_group, bitmask, packn);
Expand Down

0 comments on commit be5666d

Please sign in to comment.