CExA-project / ddc

DDC is a discrete domain computation library.
https://ddc.mdls.fr
Other
33 stars 5 forks source link

Add ddc, fft, pdi and splines targets #671

Closed tpadioleau closed 1 week ago

tpadioleau commented 2 weeks ago

Current public targets:

tpadioleau commented 1 week ago

Looks great

thanks!

tpadioleau commented 1 week ago
  1. Should we internally use ddc_ or DDC:: targets ?

  2. The NAMESPACE DDC:: option is almost then unused, only DDC::PDI_Wrapper and DDC::DDC take advantage of it. An alternative could be to use it for an impl namespace and keep an explicit management of the public namespace. For example:

    • in the CMakeLists.txt: install(EXPORT DDCTargets NAMESPACE DDC::Impl:: DESTINATION lib/cmake/DDC)
    • in the DDCConfig.cmake: add_library(DDC::core ALIAS DDC::Impl::ddc_core)
jbigot commented 1 week ago
  1. Should we internally use ddc_ or DDC:: targets ?

    1. The NAMESPACE DDC:: option is almost then unused, only DDC::PDI_Wrapper and DDC::DDC take advantage of it. An alternative could be to use it for an impl namespace and keep an explicit management of the public namespace. For example:

      • in the CMakeLists.txt: install(EXPORT DDCTargets NAMESPACE DDC::Impl:: DESTINATION lib/cmake/DDC)
      • in the DDCConfig.cmake: add_library(DDC::core ALIAS DDC::Impl::ddc_core)

1. On my side, I use the following policy:

so you'd have for example:

target_link_libraries(ddc_fft INTERFACE DDC::core Kokkos::kokkos KokkosFFT::fft)

ddc_fft, but DDC::core

  1. DDC::Impl::ddc_* instead of DDC::ddc_* sounds like a good idea indeed, maybe makes it clearer that this is a private identifier.