Skip to content

Split AsyncAdePTTransportStruct headers into topical headers#614

Merged
SeverinDiederichs merged 3 commits intoapt-sim:masterfrom
SeverinDiederichs:split_async_adept_transport_struct
May 5, 2026
Merged

Split AsyncAdePTTransportStruct headers into topical headers#614
SeverinDiederichs merged 3 commits intoapt-sim:masterfrom
SeverinDiederichs:split_async_adept_transport_struct

Conversation

@SeverinDiederichs
Copy link
Copy Markdown
Collaborator

@SeverinDiederichs SeverinDiederichs commented May 5, 2026

Split the old AsyncAdePTTransportStruct.* headers into smaller topical headers.

This is intended as a cleanup only: the transport data structures are grouped by responsibility, while runtime behavior should remain unchanged. The split makes the async transport state easier to navigate and reduces the amount of unrelated CUDA-side state pulled in through one broad header.

The following files were removed / renamed

  • include/AdePT/transport/AsyncAdePTTransportStruct.cuh
  • include/AdePT/transport/AsyncAdePTTransportStruct.hh
    into
  • include/AdePT/transport/queues/ParticleManager.cuh
  • include/AdePT/transport/queues/ParticleQueues.cuh
  • include/AdePT/transport/state/DeviceGlobals.cuh
  • include/AdePT/transport/state/GPUState.cuh
  • include/AdePT/transport/state/TransportStats.hh

Further cleanup:

As part of the split, avoid defining reusable symbols directly in topical headers:

  • gMagneticField is now declared in DeviceGlobals.cuh and defined once beside the other device globals in AsyncAdePTTransport.cuh.
  • GPUstateDeleter::operator() is now defined once in src/transport/AsyncAdePTTransport.cu.

This keeps the new headers safer to reuse from additional translation units.

@SeverinDiederichs SeverinDiederichs added the cleaning improves code clarity, readability or other label May 5, 2026
@SeverinDiederichs
Copy link
Copy Markdown
Collaborator Author

/run-test

@phsft-bot
Copy link
Copy Markdown

Can one of the admins verify this patch?

@SeverinDiederichs SeverinDiederichs requested a review from agheata May 5, 2026 09:13
Copy link
Copy Markdown
Contributor

@agheata agheata left a comment

Choose a reason for hiding this comment

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

Looks very good!

@SeverinDiederichs SeverinDiederichs merged commit 2022fe1 into apt-sim:master May 5, 2026
6 checks passed
@SeverinDiederichs SeverinDiederichs deleted the split_async_adept_transport_struct branch May 5, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleaning improves code clarity, readability or other

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants