Skip to content

Conversation

@A-006
Copy link
Collaborator

@A-006 A-006 commented Nov 5, 2024

Unit Tests and/or Case Tests for my changes

  • Change the fft CMakeLists in the file.

What's changed?

  • Currently, data and plan are coupled in a single fft class without template parameters or polymorphism. Now, use polymorphism to add device support and templates to control precision.
  • Considering that fft_base is a pure virtual base class and will not be instantiated, use weak symbols to reduce code reuse.
  • Due to the inheritance relationship between pw_basis_sub and pw_basis_big, they point to the same fft class. In this class, fft_base is also included in fft through composition. Therefore, during the destructor call, fft_base in fft is destructed twice, causing a segmentation fault. To resolve this, use the factory pattern to implement fft_base.

@A-006 A-006 marked this pull request as draft November 5, 2024 07:09
@A-006 A-006 requested a review from Qianruipku November 6, 2024 01:34
@A-006 A-006 marked this pull request as ready for review November 6, 2024 01:34
@mohanchen mohanchen added the Refactor Refactor ABACUS codes label Nov 6, 2024
@mohanchen mohanchen requested a review from Critsium-xy November 6, 2024 03:24
@A-006 A-006 marked this pull request as draft November 7, 2024 13:04
@A-006 A-006 marked this pull request as ready for review November 10, 2024 04:11
@mohanchen mohanchen added the Features Needed The features are indeed needed, and developers should have sophisticated knowledge label Nov 12, 2024
@mohanchen mohanchen merged commit 7c46674 into deepmodeling:develop Nov 12, 2024
14 checks passed
Fisherd99 pushed a commit to Fisherd99/abacus-BSE that referenced this pull request Mar 31, 2025
…pmodeling#5410)

* add the basic func of the file

* modify the Makefile

* delete file

* modify the position of the new fft

* modify the Makefile

* [pre-commit.ci lite] apply automatic fixes

* add the cpu float in the fft floder

* change the test file

* [pre-commit.ci lite] apply automatic fixes

* add the func in test

* add the float fft

* change ft into ft1

* add the file of the float_define and the device set

* delete the memory allocate in the ft

* [pre-commit.ci lite] apply automatic fixes

* add the Smart Pointer and the logic gate

* modify the position of the FFT

* change fft_bundle name

* save version of the pw_test and single version

* fix complie bug and change the fftwf logic

* add comments for the fft class

* modify the fft name and add comments

* modify the Makefile

* update the file

* update the format

* update the shared_ptr

* [pre-commit.ci lite] apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Mohan Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Features Needed The features are indeed needed, and developers should have sophisticated knowledge Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants