| 97 | } |
| 98 | |
| 99 | double Any_AnyView_GetFloat(const TVMFFIAny* any) { |
| 100 | if (any->type_index == kTVMFFIInt || any->type_index == kTVMFFIBool) { |
| 101 | return (double)(any->v_int64); |
| 102 | } else if (any->type_index == kTVMFFIFloat) { |
| 103 | return any->v_float64; |
| 104 | } |
| 105 | assert(0); // FAILED to read float |
| 106 | return 0.0; |
| 107 | } |
| 108 | // [Any_AnyView.GetInt_Float.end] |
| 109 | |
| 110 | // [Any_AnyView.GetDLTensor.begin] |
nothing calls this directly
no outgoing calls
no test coverage detected