octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing ATOMIC_REFCOUNT remainders from build system?


From: John W. Eaton
Subject: Re: Removing ATOMIC_REFCOUNT remainders from build system?
Date: Fri, 11 Oct 2019 17:03:07 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 10/11/19 12:39 PM, Rik wrote:
jwe,

Since you re-built the atomic operations atop C++ std::atomic, there
doesn't seem to be any use for OCTAVE_ENABLE_ATOMIC_REFCOUNT.  Should the
remaining vestiges in configure.ac, toplev.cc, oct-conf-post.in.h,
mk-octave-config-h.sh be removed?

Alternatively, we could re-instate the functionality in oct-refcount.h

#if defined OCTAVE_ENABLE_ATOMIC_REFCOUNT
     std::atomic<T> m_count;
#else
   T m_count;
#endif

This would mostly be of use in determining the penalty we pay for
cross-thread communication.  It might be useful if we eventually attempt an
optimization such that only objects which are traveling cross-thread use
the atomic interface.  But, this is speculative so I'm also fine with just
removing it.

If someone wants to test the cost of the penalty, it's just a one line change. Even if we keep the test in the code, I'd prefer to remove the configure option to avoid giving the impression that it is OK to compile with this feature disabled. I'm inclined to just remove it completely to avoid confusion about why there is a macro without a corresponding configure test. I pushed the following changeset:

  http://hg.savannah.gnu.org/hgweb/octave/rev/adcd6740b2c7

jwe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]