This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] PR 35256
- From: Johannes Singler <singler at ira dot uka dot de>
- To: Benjamin Kosnik <bkoz at redhat dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 20 Mar 2008 18:15:16 +0100
- Subject: Re: [v3] PR 35256
- References: <20080320093716.21802ce6@wabash.artheist.org>
Benjamin Kosnik wrote:
Updates for broken links, more elaborate markup. As part of this, I
corrected the configuration/tuning section to take into account the new
__gnu_parallel::_Settings approach.
Thanks for the docs.
Some comments:
<listitem><para><code>std::(multi_)map/set<T>::(multi_)map/set(Iterator begin, Iterator end)</code> (bulk construction)</para></listitem>
<listitem><para><code>std::(multi_)map/set<T>::insert(Iterator begin, Iterator end)</code> (bulk insertion)</para></listitem>
The dictionary bulk insertion was taken out by Paolo, but I have a patch
almost ready to reinclude it. But this has to be discussed first.
+ // Explicitly set number of threads.
+ const int threads_wanted = 20;
+ omp_set_dynamic(false);
+ omp_set_num_threads(threads_wanted);
+ if (omp_get_num_threads() != threads_wanted)
+ abort();
omp_get_num_threads() is (unfortunately) not the counterpart of
omp_set_num_threads(), and only >1 in a parallel region.
omp_get_max_threads() is better, but AFAIK not too much is guaranteed
according to the OpenMP specification.
-- Johannes