Lines Matching defs:ub

175 // ub (upper bound), and st (stride).  nproc is the number of threads relevant
186 enum sched_type schedule, T lb, T ub,
209 "pr:%%p lb:%%%s ub:%%%s st:%%%s "
214 KD_TRACE(10, (buff, gtid, pr, lb, ub, st, schedule, chunk, nproc, tid));
382 if (ub >= lb) {
383 tc = ub - lb + 1;
384 } else { // ub < lb
388 if (lb >= ub) {
391 tc = (UT)(lb - ub) / (-st) + 1;
392 } else { // lb < ub
396 if (ub >= lb) {
399 tc = (UT)(ub - lb) / st + 1;
400 } else { // ub < lb
412 pr->u.p.ub = ub;
417 pr->u.p.last_upper = ub + st;
558 pr->u.p.ub = init + small_chunk + p_extra + (id < extras ? 1 : 0);
565 pr->u.p.ub = init; // mark there is no iterations to work on
632 pr->u.p.ub = lb + limit;
634 // calculated upper bound, "ub" is user-defined upper bound
637 // adjust upper bound to "ub" if needed, so that MS lastprivate will match
640 pr->u.p.ub = (ub_tmp + st > ub ? ub : ub_tmp);
642 pr->u.p.ub = (ub_tmp + st < ub ? ub : ub_tmp);
907 inline void __kmp_dispatch_init_hier_runtime(ident_t *loc, T lb, T ub,
912 kmp_int32 ub, kmp_int32 st) {
915 __kmp_hier_scheds.scheds, __kmp_hier_scheds.small_chunks, lb, ub, st);
920 kmp_uint32 ub, kmp_int32 st) {
923 __kmp_hier_scheds.scheds, __kmp_hier_scheds.small_chunks, lb, ub, st);
928 kmp_int64 ub, kmp_int64 st) {
931 __kmp_hier_scheds.scheds, __kmp_hier_scheds.large_chunks, lb, ub, st);
936 kmp_uint64 ub, kmp_int64 st) {
939 __kmp_hier_scheds.scheds, __kmp_hier_scheds.large_chunks, lb, ub, st);
963 T ub, typename traits_t<T>::signed_t st,
994 "chunk:%%%s lb:%%%s ub:%%%s st:%%%s\n",
997 KD_TRACE(10, (buff, gtid, schedule, chunk, lb, ub, st));
1043 __kmp_dispatch_init_hier_runtime<T>(loc, lb, ub, st);
1085 __kmp_dispatch_init_algorithm(loc, gtid, pr, schedule, lb, ub, st,
1136 pr->u.p.ub = pr->u.p.lb = pr->u.p.st = pr->u.p.tc = 0;
1148 "lb:%%%s ub:%%%s"
1156 pr->u.p.ub, pr->u.p.st, pr->u.p.tc, pr->u.p.count,
1383 if (pr->u.p.count < (UT)pr->u.p.ub) {
1388 status = (init < (UT)pr->u.p.ub);
1432 pr->u.p.ub = init + small_chunk + p_extra + (id < extras ? 1 : 0);
1442 "count:%%%s ub:%%%s\n",
1444 KD_TRACE(10, (buff, gtid, id, pr->u.p.count, pr->u.p.ub));
1449 if (pr->u.p.count < (UT)pr->u.p.ub)
1455 v->u.p.count >= (UT)v->u.p.ub) {
1462 limit = v->u.p.ub; // keep initial ub
1469 // stealing succeded, reduce victim's ub by 1/4 of undone chunks
1475 init = (v->u.p.ub -= (remaining >> 2));
1479 init = (v->u.p.ub -= 1);
1488 "count:%%%s ub:%%%s\n",
1497 // now update own count and ub with stolen range excluding init chunk
1500 pr->u.p.ub = limit;
1508 // 4-byte induction variable, use 8-byte CAS for pair (count, ub)
1509 // as all operations on pair (count, ub) must be done atomically
1513 T ub;
1518 if (pr->u.p.count < (UT)pr->u.p.ub) {
1533 status = (init < (UT)vold.p.ub);
1574 vnew.p.ub = init + small_chunk + p_extra + (id < extras ? 1 : 0);
1575 // write pair (count, ub) at once atomically
1589 "count:%%%s ub:%%%s\n",
1591 KD_TRACE(10, (buff, gtid, id, pr->u.p.count, pr->u.p.ub));
1596 if (pr->u.p.count < (UT)pr->u.p.ub)
1605 vold.p.count >= (UT)vold.p.ub) {
1610 remaining = vold.p.ub - vold.p.count;
1614 vnew.p.ub -= remaining >> 2; // steal from tail of victim's range
1616 vnew.p.ub -= 1; // steal 1 chunk of 1..7 remaining
1618 KMP_DEBUG_ASSERT(vnew.p.ub * (UT)chunk <= trip);
1630 "count:%%%s ub:%%%s\n",
1632 KD_TRACE(10, (buff, gtid, victimId, vnew.p.ub, vold.p.ub));
1637 vold.p.ub - vnew.p.ub);
1640 // now update own count and ub
1641 init = vnew.p.ub;
1649 if (vold.p.count < (UT)vold.p.ub)
1699 *p_ub = pr->u.p.ub;
1704 pr->u.p.lb = pr->u.p.ub + pr->u.p.st;
2129 #define OMPT_LOOP_DISPATCH(lb, ub, st, status) \
2135 OMPT_GET_DISPATCH_CHUNK(chunk, lb, ub, st); \
2144 #define OMPT_LOOP_DISPATCH(lb, ub, st, status) // no-op
2260 pr->u.p.last_upper = pr->u.p.ub;
2295 *p_ub = pr->u.p.ub;
2423 pr->u.p.last_upper = pr->u.p.ub;
2783 // T lb, T ub, ST st, ST chunk )
2793 @param ub Upper bound
2804 kmp_int32 ub, kmp_int32 st, kmp_int32 chunk) {
2809 __kmp_dispatch_init<kmp_int32>(loc, gtid, schedule, lb, ub, st, chunk, true);
2816 kmp_uint32 ub, kmp_int32 st, kmp_int32 chunk) {
2821 __kmp_dispatch_init<kmp_uint32>(loc, gtid, schedule, lb, ub, st, chunk, true);
2829 kmp_int64 ub, kmp_int64 st, kmp_int64 chunk) {
2834 __kmp_dispatch_init<kmp_int64>(loc, gtid, schedule, lb, ub, st, chunk, true);
2842 kmp_uint64 ub, kmp_int64 st, kmp_int64 chunk) {
2847 __kmp_dispatch_init<kmp_uint64>(loc, gtid, schedule, lb, ub, st, chunk, true);
2861 kmp_int32 lb, kmp_int32 ub, kmp_int32 st,
2867 __kmp_dist_get_bounds<kmp_int32>(loc, gtid, p_last, &lb, &ub, st);
2868 __kmp_dispatch_init<kmp_int32>(loc, gtid, schedule, lb, ub, st, chunk, true);
2873 kmp_uint32 lb, kmp_uint32 ub, kmp_int32 st,
2879 __kmp_dist_get_bounds<kmp_uint32>(loc, gtid, p_last, &lb, &ub, st);
2880 __kmp_dispatch_init<kmp_uint32>(loc, gtid, schedule, lb, ub, st, chunk, true);
2885 kmp_int64 lb, kmp_int64 ub, kmp_int64 st,
2891 __kmp_dist_get_bounds<kmp_int64>(loc, gtid, p_last, &lb, &ub, st);
2892 __kmp_dispatch_init<kmp_int64>(loc, gtid, schedule, lb, ub, st, chunk, true);
2897 kmp_uint64 lb, kmp_uint64 ub, kmp_int64 st,
2903 __kmp_dist_get_bounds<kmp_uint64>(loc, gtid, p_last, &lb, &ub, st);
2904 __kmp_dispatch_init<kmp_uint64>(loc, gtid, schedule, lb, ub, st, chunk, true);
2918 If there is no more work, then the lb,ub and stride need not be modified.
3102 kmp_int32 ub, kmp_int32 st, kmp_int32 chunk,
3104 __kmp_dispatch_init<kmp_int32>(loc, gtid, schedule, lb, ub, st, chunk,
3110 kmp_uint32 ub, kmp_int32 st, kmp_int32 chunk,
3112 __kmp_dispatch_init<kmp_uint32>(loc, gtid, schedule, lb, ub, st, chunk,
3118 kmp_int64 ub, kmp_int64 st, kmp_int64 chunk,
3120 __kmp_dispatch_init<kmp_int64>(loc, gtid, schedule, lb, ub, st, chunk,
3126 kmp_uint64 ub, kmp_int64 st, kmp_int64 chunk,
3128 __kmp_dispatch_init<kmp_uint64>(loc, gtid, schedule, lb, ub, st, chunk,