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

[Graph] rename variable & function names for clarity @open sesame 11/07 21:30 #2789

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

baek2sm
Copy link
Contributor

@baek2sm baek2sm commented Nov 7, 2024

currently, same term 'InPlace' is used with different meanings by script.

it could refer to a boolean type value indicating whether in-place operation is supported, or it could refer an enum type value representing the in-place type(type: None, Restriction, Non-Restriction).

To clarify this distinction, variables and functions related to the in-place type have been renamed from 'InPlace' to 'InPlaceType'.

Similarly, both functions for getting/setting whether it supports inplace (boolean) and those for getting/setting the type of inplace (enum) use the same name, "executeInPlace".

To clarify this, I've changed the names as follows..

  • set the in-place flag (boolean) : 'executeInPlace' -> 'setInPlace'.
  • get the in-place flag (boolean) : 'executeInPlace' -> 'getInplace'.
  • set the type of in-place (enum) : 'executeInPlace' -> 'setInPlaceType'
  • get the type of in-place (enum) : 'executeInPlace' -> 'getInPlaceType.'

Self evaluation:

  1. Build test: [X]Passed [ ]Failed [ ]Skipped
  2. Run test: [X]Passed [ ]Failed [ ]Skipped

@taos-ci
Copy link

taos-ci commented Nov 7, 2024

📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #2789. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.

@baek2sm baek2sm changed the title [Graph] Rename Variable & Function Names for clarity [Graph] rename variable & function names for clarity Nov 7, 2024
@baek2sm baek2sm changed the title [Graph] rename variable & function names for clarity [Graph] rename variable & function names for clarity @open sesame 11/07 21:30 Nov 7, 2024
Copy link

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

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

@baek2sm, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Member

@skykongkong8 skykongkong8 left a comment

Choose a reason for hiding this comment

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

I see. Nice catch!

Copy link
Contributor

@djeong20 djeong20 left a comment

Choose a reason for hiding this comment

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

Nice work! I think this change is good to not get confused.

Copy link
Member

@SeoHyungjun SeoHyungjun left a comment

Choose a reason for hiding this comment

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

Currently, InPlaceType is divided into NONE, RESTRICTING, and NON_RESTRICTING.

In my opinion, I think DISABLED is clearer than NONE.
How about using DISABLED, RESTRICTING, and NON_RESTRICTING?

enum class InPlaceType{
  DISABLED,       /**< layer is not inplace */
  RESTRICTING,    /**< layer is in-place and does place restriction on layers
                    ahead of it to be in-place */
  NON_RESTRICTING /**< layer is in-place and does NOT place restriction on the
                    layers ahead of it to be in-place */
};

@baek2sm
Copy link
Contributor Author

baek2sm commented Nov 8, 2024

@SeoHyungjun Hmm.. since this enum is "TYPE" of inplace, wouldn't it be more appropriate to use "none" rather than "disabled"?

currently, same term 'InPlace' means different things depending on context.

it could refer to a boolean type value indicating whether in-place operation is supported, or it could refer an enum type value representing the in-place type(type: None, Restriction, Non-Restriction).

To clarify this distinction, variables and functions related to the in-place type have been renamed from 'InPlace' to 'InPlaceType'.

Similarly, both functions for getting/setting whether it supports inplace (boolean) and those for getting/setting the type of inplace (enum) use the same name, "executeInPlace".

To clarify this, I changed the names as follows..

- set the InPlace flag (boolean) : 'setInPlace'.
- get the InPlace flag (boolean) : 'getInplace'.
- set the type of InPlace (enum) : 'setInPlaceType'
- get the type of InPlace (enum) : 'getInPlaceType.'

**Self evaluation:**
1. Build test:   [X]Passed [ ]Failed [ ]Skipped
2. Run test:     [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Seungbaek Hong <[email protected]>
Copy link

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

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

@baek2sm, 💯 All CI checkers are successfully verified. Thanks.

@jijoongmoon jijoongmoon merged commit 77a7196 into nnstreamer:main Nov 11, 2024
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants