Home
last modified time | relevance | path

Searched refs:nthreads (Results 1 – 25 of 68) sorted by relevance

123

/netbsd-src/external/gpl3/gcc/dist/libgomp/
H A Dteam.c151 get_last_team (unsigned nthreads) in get_last_team() argument
156 struct gomp_thread_pool *pool = gomp_get_thread_pool (thr, nthreads); in get_last_team()
158 if (last_team != NULL && last_team->nthreads == nthreads) in get_last_team()
170 gomp_new_team (unsigned nthreads) in gomp_new_team() argument
175 team = get_last_team (nthreads); in gomp_new_team()
182 sizeof (*team) + nthreads * extra); in gomp_new_team()
184 team = team_malloc (sizeof (*team) + nthreads * extra); in gomp_new_team()
190 gomp_barrier_init (&team->barrier, nthreads); in gomp_new_team()
193 team->nthreads = nthreads; in gomp_new_team()
201 gomp_init_work_share (&team->work_shares[0], 0, nthreads); in gomp_new_team()
[all …]
H A Diter.c44 unsigned long nthreads = team ? team->nthreads : 1; in gomp_iter_static_next() local
50 if (nthreads == 1) in gomp_iter_static_next()
77 q = n / nthreads; in gomp_iter_static_next()
78 t = n % nthreads; in gomp_iter_static_next()
118 s0 = (thr->ts.static_trip * nthreads + i) * c; in gomp_iter_static_next()
266 unsigned long nthreads = team ? team->nthreads : 1; in gomp_iter_guided_next_locked() local
275 q = (n + nthreads - 1) / nthreads; in gomp_iter_guided_next_locked()
300 unsigned long nthreads = team ? team->nthreads : 1; in gomp_iter_guided_next() local
318 q = (n + nthreads - 1) / nthreads; in gomp_iter_guided_next()
H A Diter_ull.c45 unsigned long nthreads = team ? team->nthreads : 1; in gomp_iter_ull_static_next() local
51 if (nthreads == 1) in gomp_iter_ull_static_next()
78 q = n / nthreads; in gomp_iter_ull_static_next()
79 t = n % nthreads; in gomp_iter_ull_static_next()
120 s0 = (thr->ts.static_trip * (gomp_ull) nthreads + i) * c; in gomp_iter_ull_static_next()
267 gomp_ull nthreads = team ? team->nthreads : 1; in gomp_iter_ull_guided_next_locked() local
279 q = (n + nthreads - 1) / nthreads; in gomp_iter_ull_guided_next_locked()
304 gomp_ull nthreads = team ? team->nthreads : 1; in gomp_iter_ull_guided_next() local
325 q = (n + nthreads - 1) / nthreads; in gomp_iter_ull_guided_next()
H A Dordered.c47 if (team == NULL || team->nthreads == 1) in gomp_ordered_first()
51 if (index >= team->nthreads) in gomp_ordered_first()
52 index -= team->nthreads; in gomp_ordered_first()
78 if (team == NULL || team->nthreads == 1) in gomp_ordered_last()
88 if (next == team->nthreads) in gomp_ordered_last()
113 if (team == NULL || team->nthreads == 1) in gomp_ordered_next()
131 if (ws->ordered_num_used < team->nthreads) in gomp_ordered_next()
134 if (index >= team->nthreads) in gomp_ordered_next()
135 index -= team->nthreads; in gomp_ordered_next()
140 if (index == team->nthreads) in gomp_ordered_next()
[all …]
H A Dparallel.c145 unsigned int nthreads = team ? team->nthreads : 1; in GOMP_parallel_end() local
147 if (nthreads > 1) in GOMP_parallel_end()
157 1UL - nthreads); in GOMP_parallel_end()
160 thr->thread_pool->threads_busy -= nthreads - 1; in GOMP_parallel_end()
280 return team ? team->nthreads : 1; in omp_get_num_threads()
327 return ts->team->nthreads; in omp_get_team_size()
/netbsd-src/external/gpl3/gcc.old/dist/libgomp/
H A Dteam.c145 get_last_team (unsigned nthreads) in get_last_team() argument
150 struct gomp_thread_pool *pool = gomp_get_thread_pool (thr, nthreads); in get_last_team()
152 if (last_team != NULL && last_team->nthreads == nthreads) in get_last_team()
164 gomp_new_team (unsigned nthreads) in gomp_new_team() argument
169 team = get_last_team (nthreads); in gomp_new_team()
174 team = team_malloc (sizeof (*team) + nthreads * extra); in gomp_new_team()
179 gomp_barrier_init (&team->barrier, nthreads); in gomp_new_team()
182 team->nthreads = nthreads; in gomp_new_team()
190 gomp_init_work_share (&team->work_shares[0], 0, nthreads); in gomp_new_team()
199 team->ordered_release = (void *) &team->implicit_task[nthreads]; in gomp_new_team()
[all …]
H A Diter.c44 unsigned long nthreads = team ? team->nthreads : 1; in gomp_iter_static_next() local
50 if (nthreads == 1) in gomp_iter_static_next()
77 q = n / nthreads; in gomp_iter_static_next()
78 t = n % nthreads; in gomp_iter_static_next()
118 s0 = (thr->ts.static_trip * nthreads + i) * c; in gomp_iter_static_next()
266 unsigned long nthreads = team ? team->nthreads : 1; in gomp_iter_guided_next_locked() local
275 q = (n + nthreads - 1) / nthreads; in gomp_iter_guided_next_locked()
300 unsigned long nthreads = team ? team->nthreads : 1; in gomp_iter_guided_next() local
318 q = (n + nthreads - 1) / nthreads; in gomp_iter_guided_next()
H A Diter_ull.c45 unsigned long nthreads = team ? team->nthreads : 1; in gomp_iter_ull_static_next() local
51 if (nthreads == 1) in gomp_iter_ull_static_next()
78 q = n / nthreads; in gomp_iter_ull_static_next()
79 t = n % nthreads; in gomp_iter_ull_static_next()
120 s0 = (thr->ts.static_trip * (gomp_ull) nthreads + i) * c; in gomp_iter_ull_static_next()
267 gomp_ull nthreads = team ? team->nthreads : 1; in gomp_iter_ull_guided_next_locked() local
279 q = (n + nthreads - 1) / nthreads; in gomp_iter_ull_guided_next_locked()
304 gomp_ull nthreads = team ? team->nthreads : 1; in gomp_iter_ull_guided_next() local
325 q = (n + nthreads - 1) / nthreads; in gomp_iter_ull_guided_next()
H A Dordered.c47 if (team == NULL || team->nthreads == 1) in gomp_ordered_first()
51 if (index >= team->nthreads) in gomp_ordered_first()
52 index -= team->nthreads; in gomp_ordered_first()
78 if (team == NULL || team->nthreads == 1) in gomp_ordered_last()
88 if (next == team->nthreads) in gomp_ordered_last()
113 if (team == NULL || team->nthreads == 1) in gomp_ordered_next()
131 if (ws->ordered_num_used < team->nthreads) in gomp_ordered_next()
134 if (index >= team->nthreads) in gomp_ordered_next()
135 index -= team->nthreads; in gomp_ordered_next()
140 if (index == team->nthreads) in gomp_ordered_next()
[all …]
H A Dparallel.c138 unsigned int nthreads = team ? team->nthreads : 1; in GOMP_parallel_end() local
140 if (nthreads > 1) in GOMP_parallel_end()
150 1UL - nthreads); in GOMP_parallel_end()
153 thr->thread_pool->threads_busy -= nthreads - 1; in GOMP_parallel_end()
273 return team ? team->nthreads : 1; in omp_get_num_threads()
320 return ts->team->nthreads; in omp_get_team_size()
H A Dwork.c102 unsigned nthreads) in gomp_init_work_share() argument
113 size_t o = nthreads * sizeof (*ws->ordered_team_ids); in gomp_init_work_share()
121 ordered = nthreads * sizeof (*ws->ordered_team_ids); in gomp_init_work_share()
207 gomp_init_work_share (ws, ordered, team->nthreads); in gomp_work_share_start()
307 if (completed == team->nthreads) in gomp_work_share_end_nowait()
/netbsd-src/external/mit/libuv/dist/src/
H A Dthreadpool.c37 static unsigned int nthreads; variable
46 return (nthreads + 1) / 2; in slow_work_thread_threshold()
170 if (nthreads == 0) in uv__threadpool_cleanup()
178 for (i = 0; i < nthreads; i++) in uv__threadpool_cleanup()
189 nthreads = 0; in uv__threadpool_cleanup()
198 nthreads = ARRAY_SIZE(default_threads); in init_threads()
201 nthreads = atoi(val); in init_threads()
202 if (nthreads == 0) in init_threads()
203 nthreads = 1; in init_threads()
204 if (nthreads > MAX_THREADPOOL_SIZE) in init_threads()
[all …]
/netbsd-src/usr.sbin/npf/npftest/libnpftest/
H A Dnpf_perf_test.c55 npf_test_conc(bool st, unsigned nthreads) in npf_test_conc() argument
66 npackets = kmem_zalloc(sizeof(uint64_t) * nthreads, KM_SLEEP); in npf_test_conc()
67 l = kmem_zalloc(sizeof(lwp_t *) * nthreads, KM_SLEEP); in npf_test_conc()
69 for (unsigned i = 0; i < nthreads; i++) { in npf_test_conc()
82 for (unsigned i = 0; i < nthreads; i++) { in npf_test_conc()
86 kmem_free(npackets, sizeof(uint64_t) * nthreads); in npf_test_conc()
87 kmem_free(l, sizeof(lwp_t *) * nthreads); in npf_test_conc()
89 printf("%u\t%" PRIu64 "\n", nthreads, total / NSECS); in npf_test_conc()
/netbsd-src/external/mit/libuv/dist/test/
H A Dbenchmark-async.c35 unsigned int nthreads; member
75 static int test_async(int nthreads) { in test_async() argument
81 threads = calloc(nthreads, sizeof(threads[0])); in test_async()
84 for (i = 0; i < nthreads; i++) { in test_async()
86 ctx->nthreads = nthreads; in test_async()
99 for (i = 0; i < nthreads; i++) in test_async()
104 for (i = 0; i < nthreads; i++) { in test_async()
113 nthreads, in test_async()
H A Dbenchmark-async-pummel.c64 static int test_async_pummel(int nthreads) { in test_async_pummel() argument
70 tids = calloc(nthreads, sizeof(tids[0])); in test_async_pummel()
76 for (i = 0; i < nthreads; i++) in test_async_pummel()
86 for (i = 0; i < nthreads; i++) in test_async_pummel()
90 nthreads, in test_async_pummel()
/netbsd-src/external/cddl/osnet/dist/lib/libzpool/common/
H A Dtaskq.c229 taskq_create(const char *name, int nthreads, pri_t pri, in taskq_create() argument
237 ASSERT3S(nthreads, >=, 0); in taskq_create()
238 ASSERT3S(nthreads, <=, 100); in taskq_create()
239 pct = MIN(nthreads, 100); in taskq_create()
242 nthreads = (sysconf(_SC_NPROCESSORS_ONLN) * pct) / 100; in taskq_create()
243 nthreads = MAX(nthreads, 1); /* need at least 1 thread */ in taskq_create()
245 ASSERT3S(nthreads, >=, 1); in taskq_create()
255 tq->tq_active = nthreads; in taskq_create()
256 tq->tq_nthreads = nthreads; in taskq_create()
261 tq->tq_threadlist = kmem_alloc(nthreads * sizeof (thread_t), KM_SLEEP); in taskq_create()
[all …]
/netbsd-src/tests/lib/libpthread/
H A Dh_resolv.c145 int nthreads = NTHREADS; in main() local
162 nthreads = atoi(optarg); in main()
174 if ((nleft = malloc(nthreads * sizeof(int))) == NULL) in main()
180 if ((threads = malloc(nthreads * sizeof(pthread_t))) == NULL) in main()
184 for (i = 0; i < nthreads; i++) { in main()
191 for (i = 0; i < nthreads; i++) { in main()
207 for (i = 0; i < nthreads; i++) in main()
/netbsd-src/regress/sys/kern/allocfree/
H A Dallocfree.c50 static int nthreads; variable
147 while (barrier < nthreads) { in test_thread()
154 while (barrier2 < nthreads) { in test_thread()
198 nthreads = nt; in run2()
210 nthreads--; in run2()
219 if (nthreads == 0) { in run2()
222 printf("\t%d", (int)(total / nthreads / count)); in run2()
/netbsd-src/sys/arch/mips/rmi/
H A Drmixl_cpucore.c89 u_int nthreads; in cpucore_rmixl_attach() local
132 nthreads = MIPS_CIDFL_RMI_NTHREADS(mips_options.mips_cpu->cpu_cidflags); in cpucore_rmixl_attach()
133 aprint_normal_dev(self, "%d %s on core\n", nthreads, in cpucore_rmixl_attach()
134 nthreads == 1 ? "thread" : "threads"); in cpucore_rmixl_attach()
140 u_int thread_mask = (1 << nthreads) - 1; in cpucore_rmixl_attach()
141 u_int core_shft = sc->sc_core * nthreads; in cpucore_rmixl_attach()
/netbsd-src/external/gpl3/gcc/dist/libgomp/config/rtems/
H A Dpool.h74 gomp_get_own_thread_pool (struct gomp_thread *thr, unsigned nthreads) in gomp_get_own_thread_pool() argument
80 pool->threads_busy = nthreads; in gomp_get_own_thread_pool()
87 gomp_get_thread_pool (struct gomp_thread *thr, unsigned nthreads) in gomp_get_thread_pool() argument
102 pool->threads_busy = nthreads; in gomp_get_thread_pool()
106 pool = gomp_get_own_thread_pool (thr, nthreads); in gomp_get_thread_pool()
/netbsd-src/external/gpl3/gcc.old/dist/libgomp/config/rtems/
H A Dpool.h74 gomp_get_own_thread_pool (struct gomp_thread *thr, unsigned nthreads) in gomp_get_own_thread_pool() argument
80 pool->threads_busy = nthreads; in gomp_get_own_thread_pool()
87 gomp_get_thread_pool (struct gomp_thread *thr, unsigned nthreads) in gomp_get_thread_pool() argument
102 pool->threads_busy = nthreads; in gomp_get_thread_pool()
106 pool = gomp_get_own_thread_pool (thr, nthreads); in gomp_get_thread_pool()
/netbsd-src/external/cddl/osnet/sys/kern/
H A Dtaskq.c256 taskq_create(const char *name, int nthreads, pri_t pri, int minalloc, in taskq_create() argument
270 nthreads = MAX((ncpu * nthreads) / 100, 1); in taskq_create()
273 tq->tq_nthreads = nthreads; in taskq_create()
279 tq->tq_executor = kmem_alloc(sizeof(*tq->tq_executor) * nthreads, in taskq_create()
281 for (i = 0; i < nthreads; i++) { in taskq_create()
293 taskq_create_proc(const char *name, int nthreads, pri_t pri, int minalloc, in taskq_create_proc() argument
297 return taskq_create(name, nthreads, pri, minalloc, maxalloc, flags); in taskq_create_proc()
/netbsd-src/usr.sbin/npf/npftest/
H A Dnpftest.c194 unsigned nthreads = 0; in main() local
242 if ((nthreads = atoi(optarg)) > 0 && in main()
245 sprintf(nthr, "%u", nthreads + 1); in main()
262 if (benchmark && (!config || !nthreads)) { in main()
340 rumpns_npf_test_conc(false, nthreads); in main()
343 rumpns_npf_test_conc(true, nthreads); in main()
/netbsd-src/external/gpl3/gcc.old/dist/libgomp/config/nvptx/
H A Dteam.c118 gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads, in gomp_team_start() argument
141 if (nthreads > 1) in gomp_team_start()
153 if (nthreads == 1) in gomp_team_start()
157 for (unsigned i = 1; i < nthreads; ++i) in gomp_team_start()
/netbsd-src/external/gpl3/gcc/dist/libgomp/config/nvptx/
H A Dteam.c121 gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads, in gomp_team_start() argument
144 if (nthreads > 1) in gomp_team_start()
156 if (nthreads == 1) in gomp_team_start()
160 for (unsigned i = 1; i < nthreads; ++i) in gomp_team_start()

123