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

Refactor: Modify class BaseMatrix #4239

Merged
merged 39 commits into from
May 27, 2024
Merged

Refactor: Modify class BaseMatrix #4239

merged 39 commits into from
May 27, 2024

Conversation

DylanWRh
Copy link

@DylanWRh DylanWRh commented May 26, 2024

Reminder

  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

What's changed?

Refactor the code in class BaseMatrix to be safer.

  • Add allocation judgement and possible memory release in operator= to avoid potential memory waste
  • Add debug statement to check if value_begin is nullptr in functions such as add_array, add_element, and get_value.
  • Modify documentation for add_array function to avoid potential misunserstanding

@DylanWRh DylanWRh marked this pull request as ready for review May 26, 2024 13:29
@mohanchen mohanchen requested a review from dyzheng May 27, 2024 01:04
Copy link
Collaborator

@dyzheng dyzheng left a comment

Choose a reason for hiding this comment

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

LGTM

@dyzheng dyzheng merged commit 79b9111 into deepmodeling:develop May 27, 2024
13 checks passed
@dyzheng
Copy link
Collaborator

dyzheng commented May 27, 2024

@DylanWRh please simplify your commit history

1 similar comment
@dyzheng
Copy link
Collaborator

dyzheng commented May 27, 2024

@DylanWRh please simplify your commit history

@DylanWRh
Copy link
Author

@DylanWRh please simplify your commit history

OK! I'll pay attention to that in future PRs.

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