Template Function mindspore::api::utils::cast
Defined in File utils.h
Function Documentation
-
template<typename T, typename = typename std::enable_if_t<is_wrapper_ptr<T>::value, T>>
inline T mindspore::api::utils::cast(const BasePtr &ptr) Cast the given object pointer to a pointer with the given class.
- Parameters
ptr – [in] The pointer to the object to casted.
- Returns
A non-null pointer if the input pointer is not null and cast success, nullptr otherwise.