MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / ToInt

Method ToInt

oneflow/api/cpp/framework/ivalue.cpp:28–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28int64_t IValue::ToInt() const {
29 CHECK_EQ(tag_, Tag::kInt) << "Current value is not an int.";
30 return payload_.i.v_int;
31}
32
33double IValue::ToDouble() const {
34 CHECK_EQ(tag_, Tag::kDouble) << "Current value is not a double.";

Callers 1

TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64