MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / assert_is

Method assert_is

dnn/include/megdnn/dtype.h:510–513  ·  view source on GitHub ↗

assert this dtype is given type; throw exception on failure

Source from the content-addressed store, hash-verified

508
509 //! assert this dtype is given type; throw exception on failure
510 void assert_is(const DType& rhs) const {
511 if (m_trait != rhs.m_trait)
512 on_assert_is_failed(rhs.name());
513 }
514
515 template <typename T>
516 inline void assert_is_ctype() const;

Callers 4

tensor.cppFile · 0.80
TESTFunction · 0.80
check_execMethod · 0.80

Calls 1

nameMethod · 0.45

Tested by 1

TESTFunction · 0.64