Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NODE] Macro to define NodeRef methods, constructor style example #3224

Merged
merged 1 commit into from
May 23, 2019

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented May 21, 2019

This PR demonstrates what can be done as discussed in RFC #3223 . We will need to wait to see discussions in the RFC before merging this.

  • Provide fine-grained macro to define NodeRef methods
  • Migrate two classes(ConstIntBound, ModularSet) to use constructor style.


/*! \brief Macro to make it easy to define node ref type given node */
#define TVM_DEFINE_NODE_REF(TypeName, NodeName) \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add BaseType to this macro?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, I think we will move to avoid use TVM_DEFINE_NODE_REF and directly use class declarations plus TVM_DEFINE_NODE_REF_METHODS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants