Template Function mindspore::api::utils::isa

Function Documentation

template<typename T, typename U = typename ImmTrait<T>::type::element_type>
inline bool mindspore::api::utils::isa(const ValuePtr &ptr)

Check whether the given object is an value of the given c++ type T.

Parameters

ptr[in] The pointer to the given value object.

Returns

True if the pointer is not null and it is an value of the given c++ type, false otherwise.