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

Function _getBytes

source/backend/cpu/CPUTensorConvert.cpp:270–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270static int _getBytes(const CoreFunctions* core, const Tensor* output) {
271 auto bytes = output->getType().bytes();
272 auto quant = TensorUtils::getDescribe(output)->quantAttr.get();
273 if (output->getType().code == halide_type_float) {
274 bytes = core->bytes;
275 }
276 if (nullptr != quant && TensorUtils::getDescribe(output)->applyQuant) {
277 bytes = 1;
278 }
279 return bytes;
280}
281ErrorCode CPUTensorConverter::convert(const Tensor* input, const Tensor* output, const CoreFunctions* core, int tId, int numberThread) {
282 auto ib = input->buffer();
283 auto ob = output->buffer();

Callers 1

convertMethod · 0.85

Calls 3

bytesMethod · 0.45
getTypeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected