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

format genPowerWithMul #3809

Merged
merged 1 commit into from
Feb 4, 2025
Merged

format genPowerWithMul #3809

merged 1 commit into from
Feb 4, 2025

Conversation

liqiangxl
Copy link
Collaborator

@liqiangxl liqiangxl commented Feb 2, 2025

Minor change to genPowerWithMul(), to ensure a new line is added before indentation. Generated code changes from

        T4[0]
          = T2[0]        
  * T2[0];

to

        T4[0]
          = T2[0]
          * T2[0];

Bad format was introdued in #3774 by accident.

Copy link

github-actions bot commented Feb 2, 2025

Description

  • Improve code formatting in genPowerWithMul()

  • Ensure newline before indentation in generated code


Changes walkthrough 📝

Relevant files
Formatting
codegen.cpp
Add newline before indentation                                                     

csrc/codegen.cpp

  • Add newline before indentation in genPowerWithMul()
  • Ensure consistent formatting in generated code
  • +2/-1     

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🧪 No relevant tests
    ⚡ Recommended focus areas for review

    Formatting Consistency

    The change introduces a new line before the multiplication operation, which is different from the original formatting. Ensure that this change is consistent with the overall code style and does not introduce any unintended formatting issues.

    code_ << "\n";
    indent() << kTab << "* " << lhs;

    @liqiangxl liqiangxl marked this pull request as ready for review February 2, 2025 00:11
    @liqiangxl
    Copy link
    Collaborator Author

    !test

    @liqiangxl liqiangxl requested a review from jjsjann123 February 3, 2025 18:42
    Copy link
    Collaborator

    @jjsjann123 jjsjann123 left a comment

    Choose a reason for hiding this comment

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

    :shipit:

    @jjsjann123 jjsjann123 merged commit cecb2b4 into main Feb 4, 2025
    51 checks passed
    @jjsjann123 jjsjann123 deleted the llu/format_power2mul branch February 4, 2025 18:14
    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