This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] PR 35256


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&lt;T&gt;::(multi_)map/set(Iterator begin, Iterator end)</code> (bulk construction)</para></listitem>
   <listitem><para><code>std::(multi_)map/set&lt;T&gt;::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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]