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

Method getAlphaFloat

source/core/ConvolutionCommon.cpp:827–841  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

825}
826
827const float* ConvolutionCommon::Int8Common::getAlphaFloat() {
828 if (alpha.get() != nullptr) {
829 return alpha.get();
830 }
831 if (alphaHalf.get() != nullptr) {
832 alpha.reset(alphaSize);
833 auto src = reinterpret_cast<const half_float::half*>(alphaHalf.get());
834 auto dst = alpha.get();
835 for (int i = 0; i < alphaSize; ++i) {
836 dst[i] = float(src[i]);
837 }
838 return alpha.get();
839 }
840 return nullptr;
841}
842
843const int16_t* ConvolutionCommon::Int8Common::getAlphaHalf() {
844 if (alphaHalf.get() != nullptr) {

Callers 1

loadMethod · 0.80

Calls 2

getMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected