MCPcopy Create free account
hub / github.com/alibaba/MNN / InsertMap

Function InsertMap

source/core/ConvolutionCommon.cpp:163–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163static void InsertMap(PSIMPLE_MAP map, int8_t k, int8_t v) {
164 for (uint32_t i = 0; i < map->CurMapCnt; i++) {
165 if (map->CharCharMap[i * 2] == k) {
166 map->CharCharMap[i * 2 + 1] = v;
167 return;
168 }
169 }
170 if (map->CurMapCnt >= map->CharMapSize)
171 return;
172 map->CharCharMap[map->CurMapCnt * 2] = k;
173 map->CharCharMap[map->CurMapCnt * 2 + 1] = v;
174 map->CurMapCnt++;
175}
176
177static int8_t FindInMap(PSIMPLE_MAP map, int8_t k, int *found) {
178 for (uint32_t i = 0; i < map->CurMapCnt; i++) {

Callers 1

ReadSparseQuanData_cFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected