MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ReverseIndices

Method ReverseIndices

tensorflow/lite/toco/model.h:1121–1142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1119 }
1120
1121 void ReverseIndices() {
1122 CHECK_EQ(start_indices.size(), stop_indices.size());
1123 CHECK_EQ(stop_indices.size(), strides.size());
1124
1125 std::reverse(start_indices.begin(), start_indices.end());
1126 std::reverse(stop_indices.begin(), stop_indices.end());
1127 std::reverse(strides.begin(), strides.end());
1128
1129 begin_mask = toco::port::ReverseBits32(static_cast<uint32>(begin_mask)) >>
1130 (32 - start_indices.size());
1131 ellipsis_mask =
1132 toco::port::ReverseBits32(static_cast<uint32>(ellipsis_mask)) >>
1133 (32 - start_indices.size());
1134 end_mask = toco::port::ReverseBits32(static_cast<uint32>(end_mask)) >>
1135 (32 - start_indices.size());
1136 new_axis_mask =
1137 toco::port::ReverseBits32(static_cast<uint32>(new_axis_mask)) >>
1138 (32 - start_indices.size());
1139 shrink_axis_mask =
1140 toco::port::ReverseBits32(static_cast<uint32>(shrink_axis_mask)) >>
1141 (32 - start_indices.size());
1142 }
1143};
1144
1145// Reshaping operator, reshaping its input array to a two-dimensional shape

Callers

nothing calls this directly

Calls 5

reverseFunction · 0.85
ReverseBits32Function · 0.85
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected