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

Remove unnecessary compile definitions #672

Conversation

tpadioleau
Copy link
Member

@tpadioleau tpadioleau commented Oct 31, 2024

Removed:

  • target_compile_definitions(DDC INTERFACE "DDC_BUILD_KERNELS_FFT")
  • target_compile_definitions(DDC INTERFACE "DDC_BUILD_KERNELS_SPLINES")
  • target_compile_definitions(PDI_Wrapper INTERFACE "DDC_BUILD_PDI_WRAPPER")

target_compile_definitions(DDC INTERFACE DDC_BUILD_DOUBLE_PRECISION) is replaced by a config.hpp.in file.

DDC public headers

  • <ddc/ddc.hpp> available using cmake target DDC::DDC
  • <ddc/kernels/fft.hpp> available using cmake target DDC::DDC if cmake option DDC_BUILD_KERNELS_FFT=ON
  • <ddc/kernels/splines.hpp> available using cmake target DDC::DDC if cmake option DDC_BUILD_KERNELS_SPLINES=ON
  • <ddc/pdi.hpp> available using cmake target DDC::PDI_Wrapper if cmake option DDC_BUILD_PDI_WRAPPER=ON

@tpadioleau tpadioleau self-assigned this Oct 31, 2024
@tpadioleau tpadioleau linked an issue Oct 31, 2024 that may be closed by this pull request
@tpadioleau tpadioleau force-pushed the 666-create-a-configuration-file-containing-preprocessor-definitions branch from f14218d to 84b0ef9 Compare October 31, 2024 18:40
CMakeLists.txt Outdated Show resolved Hide resolved
@tpadioleau tpadioleau force-pushed the 666-create-a-configuration-file-containing-preprocessor-definitions branch 2 times, most recently from 1063899 to 7e9b0c9 Compare October 31, 2024 19:04
Copy link
Member Author

Choose a reason for hiding this comment

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

Internally to DDC, one has to include this file when the preprocessor macros are used to avoid any surprise

@tpadioleau tpadioleau force-pushed the 666-create-a-configuration-file-containing-preprocessor-definitions branch 3 times, most recently from c20122c to ddef80a Compare November 1, 2024 09:28
@tpadioleau tpadioleau changed the title Remove 3 out of 4 compile definitions Remove unnecessary compile definitions Nov 1, 2024
@tpadioleau tpadioleau marked this pull request as ready for review November 4, 2024 16:43
@tpadioleau tpadioleau force-pushed the 666-create-a-configuration-file-containing-preprocessor-definitions branch 3 times, most recently from 3c51b3d to 52d4b74 Compare November 8, 2024 08:29
@tpadioleau tpadioleau force-pushed the 666-create-a-configuration-file-containing-preprocessor-definitions branch from 52d4b74 to 9343a8a Compare November 26, 2024 11:34
Copy link
Member

@yasahi-hpc yasahi-hpc 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. Regarding examples, do you need PDI enabled versions for all examples? Since it is an advanced usage, I think one example is sufficient. Making other examples as simple as possible without PDIs would help beginners.

examples/CMakeLists.txt Show resolved Hide resolved
@tpadioleau
Copy link
Member Author

Looks good.

thanks!

Regarding examples, do you need PDI enabled versions for all examples? Since it is an advanced usage, I think one example is sufficient. Making other examples as simple as possible without PDIs would help beginners.

Need, no. It was introduced to be sure we compile the PDI related classes. I don't know yet how to write PDI tests.

@tpadioleau tpadioleau merged commit 3bf7b3a into main Nov 27, 2024
55 checks passed
@tpadioleau tpadioleau deleted the 666-create-a-configuration-file-containing-preprocessor-definitions branch November 27, 2024 13:39
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.

Create a configuration file containing preprocessor definitions
2 participants