Skip to content

Conversation

jblomer
Copy link
Contributor

@jblomer jblomer commented Sep 22, 2025

Allow for std::atomic --> T (or compatible) automatic conversion and vice versa.

@jblomer jblomer self-assigned this Sep 22, 2025
@jblomer jblomer force-pushed the ntuple-evolution-atomic branch from 9ce4dd5 to ac97cad Compare September 22, 2025 14:48
Copy link

github-actions bot commented Sep 22, 2025

Test Results

    21 files      21 suites   3d 13h 52m 56s ⏱️
 3 681 tests  3 680 ✅ 0 💤  1 ❌
75 427 runs  75 406 ✅ 0 💤 21 ❌

For more details on these failures, see this check.

Results for commit 73ef349.

♻️ This comment has been updated with latest results.

{
auto model = ROOT::RNTupleModel::Create();
auto a = model->MakeField<std::atomic<std::int32_t>>("a");
auto i = model->MakeField<std::int32_t>("i");
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should also test with a class type (and one where is_lock_free is false)

Copy link
Member

@hahnjo hahnjo left a comment

Choose a reason for hiding this comment

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

In principle, the changes look neat and small. I'm wondering about the error case: When reconciling an RAtomicField with something on-disk that is not std::atomic, we unconditionally delegate to the item field. Is that maybe confusing for the error message? (I don't have an immediate idea how to do it better)


void ROOT::RAtomicField::ReconcileOnDiskField(const RNTupleDescriptor &desc)
{
static const std::vector<std::string> prefixes = {"std::atomic<"};
Copy link
Member

Choose a reason for hiding this comment

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

not used anymore

Allow for std::atomic<T> --> T (or compatible) automatic conversion and
vice versa.
@jblomer jblomer force-pushed the ntuple-evolution-atomic branch from ac97cad to 73ef349 Compare September 27, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants