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

Function get_float

compiler/tools/kernel_exporter/config_attr.cpp:68–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68float get_float() {
69 llvm::outs() << "please input a float number"
70 << "\n";
71 std::string ret;
72 std::string num;
73 std::cin >> num;
74 int n = num.size();
75 for (int i = 0; i < n; i++) {
76 if ((num[i] >= '0' && num[i] <= '9') || num[i] == '.') {
77 ret.push_back(num[i]);
78 }
79 }
80 llvm::outs() << "input: " << stof(ret) << "\n";
81
82 return stof(ret);
83}
84
85std::string support_map_to_msg(const std::map<int, std::string>& m) {
86 std::string msg = "\n";

Callers 1

config_attrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected