Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ try_cast
Function
try_cast
lite/include/lite/tensor.h:440–446 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
438
*/
439
template <class T>
440
bool try_cast() const {
441
if (get_type<T>() == m_type) {
442
return true;
443
} else {
444
return false;
445
}
446
}
447
448
/**
449
* @brief unsafe cast to void*
Callers
15
py_apply
Function · 0.85
TensorWrapper
Method · 0.85
reset
Method · 0.85
tensor_to_dlpack
Function · 0.85
init_tensor
Function · 0.85
apply_module_trace_hook
Method · 0.85
attach
Method · 0.85
backward
Method · 0.85
get_backward_closure
Method · 0.85
is_attached_to
Method · 0.85
apply_external_imperative_hook
Method · 0.85
_dtype_promotion
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected