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

Move duplicated one-liner to TensorUtils #682

Merged
1 commit merged into from
Feb 9, 2023

Conversation

dagardner-nv
Copy link
Contributor

Simple one-liner for calculating the element count of a tensor based on the shape was copy/pasted into four different places in the code base (Likely I'm to blame for at least one of these).

This just replaces them all with a call to TensorUtils::get_elem_count

@dagardner-nv dagardner-nv added non-breaking Non-breaking change improvement Improvement to existing functionality 3 - Ready for Review labels Feb 8, 2023
@dagardner-nv dagardner-nv requested a review from a team as a code owner February 8, 2023 22:12
Copy link
Contributor

@mdemoret-nv mdemoret-nv left a comment

Choose a reason for hiding this comment

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

Looks good

@mdemoret-nv
Copy link
Contributor

/merge

@ghost ghost merged commit e31e28a into nv-morpheus:branch-23.03 Feb 9, 2023
jjacobelli pushed a commit to jjacobelli/Morpheus that referenced this pull request Mar 7, 2023
Simple one-liner for calculating the element count of a tensor based on the shape was copy/pasted into four different places in the code base (Likely I'm to blame for at least one of these).

This just replaces them all with a call to `TensorUtils::get_elem_count`

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Michael Demoret (https://github.com/mdemoret-nv)

URL: nv-morpheus#682
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement to existing functionality non-breaking Non-breaking change
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants