MCPcopy Create free account
hub / github.com/MegEngine/MegCC / one

Method one

compiler/lib/KernelGen/Utils/Utils.cpp:75–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75std::string Utils::DtypeHelper::one() {
76 switch (m_dtype) {
77 case DtypeEnum::float32:
78 return "1.f";
79 case DtypeEnum::int32:
80 return "1";
81 default:
82 CC_ASSERT(0) << "not support dtype " << (int)m_dtype;
83 }
84 return "";
85}
86
87std::string Utils::DtypeHelper::zero() {
88 switch (m_dtype) {

Callers 1

gen_initFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected