[cpp-threads] Implicit Conversion for Atomics
Lawrence Crowl
Lawrence at Crowl.org
Tue Jan 22 19:58:03 GMT 2008
On 1/22/08, Peter Dimov <pdimov at mmltd.net> wrote:
> > In the October 2007 C++ meeting in Kona, I agreed to write up
> > a paper on the issues with implicit conversion operators on the
> > atomic types. My first draft is attached.
>
> You state in the "hides cost" section that
>
> An atomic store is generally more expensive than an atomic load.
>
> Is this indeed true for the seq_cst constraint?
Good question. I don't have an immediate answer.
> I'd also add that
>
> Implicit Load Encourages SC-focused Presentations
>
> although, to be honest, so do the default memory_order_seq_cst arguments.
> I'd certainly prefer it if articles and papers state the minimal memory
> ordering requirements for each atomic op, instead of just assuming SC.
I think there are both positives and negatives to your point. Does this
paragraph capture the issue?
Presentations, articles, and papers
will likely assume or require sequentially-consistent operations,
which are often stronger than algorithms require.
The consequences are that
presented algorithms are more accessible but less efficient.
--
Lawrence Crowl
More information about the cpp-threads
mailing list