public:
using TVMArgs = runtime::TVMArgs;
using TVMRetValue = runtime::TVMRetValue;
+ /*! \brief virtual destructor */
+ virtual ~BaseAttrsNode() {}
// visit function
virtual void VisitAttrs(AttrVisitor* v) {}
/*!
* \param key The attribute key
* \return bool True if the key is present
*/
- TVM_DLL static const bool HasGenericAttr(const std::string& key);
+ TVM_DLL static bool HasGenericAttr(const std::string& key);
};
/*!
*/
class TypeReporterNode : public Object {
public:
+ /*! \brief virtual destructor */
+ virtual ~TypeReporterNode() {}
/*!
* \brief Create a type equality constraint.
*
* \brief move constructor
* \param other source
*/
- Array(Array<T> && other) { // NOLINT(*)
+ Array(Array<T> && other) : ObjectRef() { // NOLINT(*)
data_ = std::move(other.data_);
}
/*!
* \brief copy constructor
* \param other source
*/
- Array(const Array<T> &other) { // NOLINT(*)
+ Array(const Array<T> &other) : ObjectRef() { // NOLINT(*)
data_ = std::move(other.data_);
}
/*!
*/
class TempExprNode : public ExprNode {
public:
+ /*! \brief virtual destructor */
+ virtual ~TempExprNode() {}
/*!
* \brief Convert the expression to a normal(non-temp) Expr.
* \return The corresponding normal(non-temp) expression.
*/
#define TVM_DECLARE_BASE_OBJECT_INFO(TypeName, ParentType) \
static_assert(!ParentType::_type_final, "ParentObj maked as final"); \
- static const uint32_t RuntimeTypeIndex() { \
+ static uint32_t RuntimeTypeIndex() { \
if (TypeName::_type_index != ::tvm::runtime::TypeIndex::kDynamic) { \
return TypeName::_type_index; \
} \
return _GetOrAllocRuntimeTypeIndex(); \
} \
- static const uint32_t _GetOrAllocRuntimeTypeIndex() { \
+ static uint32_t _GetOrAllocRuntimeTypeIndex() { \
static uint32_t tidx = Object::GetOrAllocRuntimeTypeIndex( \
TypeName::_type_key, \
TypeName::_type_index, \
/*! \brief Base node of internal functions. */
class FunctionBaseNode : public Object {
public:
+ /*! \brief virtual destructor */
+ virtual ~FunctionBaseNode() {}
/*! \return the name of the function */
virtual const std::string& func_name() const = 0;
/*! \return the number of outputs of this function */
public:
/*! \brief the result type of this functor */
using result_type = R;
+ /*! \brief virtual destructor */
+ virtual ~AttrFunctor() {}
/*!
* \brief The functor call.
* \param n The expression node.
}
// Check if a key is present in the registry.
-const bool Op::HasGenericAttr(const std::string& key) {
+bool Op::HasGenericAttr(const std::string& key) {
OpManager* mgr = OpManager::Global();
std::lock_guard<std::mutex> lock(mgr->mutex);
auto it = mgr->attr.find(key);
*/
class CompileEngineNode : public Object {
public:
+ /*! \brief destructor */
+ virtual ~CompileEngineNode() {}
/*!
* \brief Get lowered result.
* \param key The key to the cached function.
class CSourceModuleCodegenBase {
public:
CSourceModuleCodegenBase() = default;
+ virtual ~CSourceModuleCodegenBase() = default;
/*!
* \brief Create a runtime module for the external library. For example, it
// The base class to generate the declaration functions in C.
class CodegenCBase {
+ public:
+ virtual ~CodegenCBase() {}
+
protected:
/*! \brief Print indents using spaces. */
void PrintIndents() {
*/
class ParallelOpCombiner {
public:
+ /*! \brief virtual destructor */
+ virtual ~ParallelOpCombiner() {}
/*
* \brief Constructor.
* \param op_name name of op to combine
class FuelNode : public RelayNode {
public:
+ virtual ~FuelNode() {}
// Please implement one of the following function or there will be infinite loop.
/*! \brief return the new Fuel, and whether progress is made.
*
TransformMemorizer() {}
explicit TransformMemorizer(ObjectPtr<Object> n) : ObjectRef(n) {}
+ virtual ~TransformMemorizer() {}
+
TransformMemorizerNode* operator->() {
return static_cast<TransformMemorizerNode*>(get_mutable());
}
return input_tt->shape;
}
-static inline const int32_t GetQmin(const DataType& dtype) {
+static inline int32_t GetQmin(const DataType& dtype) {
CHECK_LE(dtype.bits(), 32)
<< "QNN ops support int32 or lower precision";
if (dtype.is_int() || dtype.is_uint()) {
}
}
-static inline const int32_t GetQmax(const DataType& dtype) {
+static inline int32_t GetQmax(const DataType& dtype) {
CHECK_LE(dtype.bits(), 32)
<< "QNN ops support int32 or lower precision";
if (dtype.is_int() || dtype.is_uint()) {
*/
class Library : public Object {
public:
+ // destructor.
+ virtual ~Library() {}
/*!
* \brief Get the symbol address for a given name.
* \param name The name of the symbol.
} else {
// No longlong3, longlong4
LOG(FATAL) << "Cannot convert type " << t << " to CUDA type on a L32 platform";
+ break;
}
} else {
os << "long"; break;
template <class T>
class BaseQueue {
public:
- ~BaseQueue() {
+ virtual ~BaseQueue() {
if (fpga_buff_ != nullptr) {
VTAMemFree(fpga_buff_);
}