Skip to content

Add default methods to Operand to get the shape and datatype from asOutput(). #151

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

Closed
wants to merge 1 commit into from

Conversation

rnett
Copy link
Contributor

@rnett rnett commented Nov 16, 2020

Add default methods to Operand to get the shape and datatype from asOutput().

Fixes #146.

/**
* Returns the build-time shape of this operand. May be only partially known.
*/
default Shape shape(){
Copy link
Collaborator

@karllessard karllessard Nov 16, 2020

Choose a reason for hiding this comment

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

I guess we want to mark the same methods in Output as overrides now (@Override) and probably inherit the javadoc

Copy link
Collaborator

@karllessard karllessard left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @rnett, just a small change and then we are good

@karllessard
Copy link
Collaborator

@rnett , I've started to create PRs for the type-system refactoring (see #139) and the first one (#153) partially covers the changes in your PR, but wrt the new design. Plus, the addition of dataType() in Operand will come soon after, again with some alterations.

Therefore, I would like to see if you would agree to close your PR to avoid any conflict.

@rnett
Copy link
Contributor Author

rnett commented Nov 19, 2020

I saw that, it's fine by me.

@rnett rnett closed this Nov 19, 2020
@rnett rnett deleted the rn_operand_shape_dtype branch November 19, 2020 03:32
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.

Only having shape and dataType on Output is unintuitive and hard to find
2 participants