Lines Matching refs:num_threads
66 * Dimensions (num_threads + 1) x (num_bins + 1). */
94 int num_threads;
138 value_type** temporaries = new value_type*[d->num_threads];
164 // Sum up bins, sd->dist[s + 1][d->num_threads] now contains the
168 sd->dist[s + 1] + d->num_threads + 1,
176 global_offset += sd->dist[s + 1][d->num_threads];
182 for (int t = 0; t < d->num_threads + 1; ++t)
184 offset = sd->dist[s + 1][d->num_threads];
197 for (thread_index_t t = 0; t < d->num_threads; ++t)
209 // Last column [d->num_threads] stays unchanged.
226 ((b == d->bins_begin) ? 0 : sd->dist[b][d->num_threads]),
228 sd->temporaries[iam] + sd->dist[b + 1][d->num_threads];
231 ((b == d->bins_begin) ? 0 : sd->dist[b][d->num_threads]));
253 * @param num_threads Number of threads to use.
262 thread_index_t num_threads,
273 if (num_threads > n)
274 num_threads = static_cast<thread_index_t>(n);
319 num_threads = std::min<bin_index>(num_threads, num_bins);
321 if (num_threads <= 1)
328 # pragma omp parallel num_threads(num_threads)
330 thread_index_t num_threads = omp_get_num_threads();
334 [num_threads];
336 sd.temporaries = new value_type*[num_threads];
340 sd.dist[b] = new difference_type[num_threads + 1];
346 starts = sd.starts = new difference_type[num_threads + 1];
351 difference_type chunk_length = n / num_threads,
352 split = n % num_threads, start = 0;
353 difference_type bin_chunk_length = num_bins / num_threads,
354 bin_split = num_bins % num_threads;
355 for (thread_index_t i = 0; i < num_threads; ++i)
367 pus[i].num_threads = num_threads;
371 starts[num_threads] = start;