MCPcopy 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_applyFunction · 0.85
TensorWrapperMethod · 0.85
resetMethod · 0.85
tensor_to_dlpackFunction · 0.85
init_tensorFunction · 0.85
attachMethod · 0.85
backwardMethod · 0.85
get_backward_closureMethod · 0.85
is_attached_toMethod · 0.85
_dtype_promotionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected