| 204 | return proc; |
| 205 | } |
| 206 | static 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 | } |
| 215 | static 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); |