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

Function _zero

source/backend/cpu/CPURaster.cpp:206–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 return proc;
205}
206static void _zero(const Tensor::InsideDescribe::Region& slice, int bytes, uint8_t* dstPtr) {
207 for (int z=0; z<slice.size[0]; ++z) {
208 auto dstZ = dstPtr + (z) * slice.dst.stride[0] * bytes;
209 for (int y=0; y<slice.size[1]; ++y) {
210 auto dstY = dstZ + y * slice.dst.stride[1] * bytes;
211 ::memset(dstY, 0, slice.size[2] * bytes);
212 }
213 }
214}
215static bool _reduceblit(const Tensor::InsideDescribe::Region& slice, int bytes, const uint8_t* srcPtr, uint8_t* dstPtr, FP16ToFP32 funcFp16ToFp32 = nullptr, FP32ToFP16 funcFp32ToFp16 = nullptr) {
216 ReduceInfo reduceInfo;
217 reduceInfo.compute(slice);

Callers 1

onExecuteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected