This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] PR 35256
On Thu, 20 Mar 2008 18:15:16 +0100
Johannes Singler <singler@ira.uka.de> wrote:
> 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.
Thanks. I'll remove this for the time being.
> > + // 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.
Ok.
I think I can just remove the part after omp_set_num_threads() for the
docs.
-benjamin