26 |
|
static ForkJoinPool defaultExecutor() { |
27 |
|
ForkJoinPool p = defaultExecutor; // double-check |
28 |
|
if (p == null) { |
29 |
< |
synchronized(poolLock) { |
29 |
> |
synchronized (poolLock) { |
30 |
|
p = defaultExecutor; |
31 |
|
if (p == null) { |
32 |
|
// use ceil(7/8 * ncpus) |
1491 |
|
if ((filtered && !pap.isSelected(k)) || |
1492 |
|
(x = src[k]) == null) |
1493 |
|
continue; |
1494 |
< |
int hc = byIdentity? System.identityHashCode(x): x.hashCode(); |
1494 |
> |
int hc = byIdentity ? System.identityHashCode(x) : x.hashCode(); |
1495 |
|
int hash = hash(hc); |
1496 |
|
long entry = (((long)hash) << 32) + (k + 1); |
1497 |
|
int idx = hash & mask; |
1657 |
|
this.gran = gran; |
1658 |
|
} |
1659 |
|
|
1660 |
< |
public void compute() { |
1660 |
> |
public void compute() { |
1661 |
|
int l = origin; |
1662 |
|
int g = gran; |
1663 |
|
if (n > g) { |
1693 |
|
this.a = a; this.w = w; this.origin = origin; this.n = n; |
1694 |
|
this.gran = gran; |
1695 |
|
} |
1696 |
< |
public void compute() { |
1696 |
> |
public void compute() { |
1697 |
|
int l = origin; |
1698 |
|
int g = gran; |
1699 |
|
if (n > g) { |
1730 |
|
this.a = a; this.w = w; this.origin = origin; this.n = n; |
1731 |
|
this.gran = gran; |
1732 |
|
} |
1733 |
< |
public void compute() { |
1733 |
> |
public void compute() { |
1734 |
|
int l = origin; |
1735 |
|
int g = gran; |
1736 |
|
if (n > g) { |
1766 |
|
this.a = a; this.w = w; this.origin = origin; this.n = n; |
1767 |
|
this.gran = gran; |
1768 |
|
} |
1769 |
< |
public void compute() { |
1769 |
> |
public void compute() { |
1770 |
|
int l = origin; |
1771 |
|
int g = gran; |
1772 |
|
if (n > g) { |
1804 |
|
this.gran = gran; |
1805 |
|
} |
1806 |
|
|
1807 |
< |
public void compute() { |
1807 |
> |
public void compute() { |
1808 |
|
int l = origin; |
1809 |
|
int g = gran; |
1810 |
|
if (n > g) { |
1840 |
|
this.a = a; this.w = w; this.origin = origin; this.n = n; |
1841 |
|
this.gran = gran; |
1842 |
|
} |
1843 |
< |
public void compute() { |
1843 |
> |
public void compute() { |
1844 |
|
int l = origin; |
1845 |
|
int g = gran; |
1846 |
|
if (n > g) { |
2341 |
|
while (cmp.compare(pivot, a[right]) < 0) |
2342 |
|
--right; |
2343 |
|
int c; |
2344 |
< |
while (left < right && (c = cmp.compare(pivot, a[left])) >= 0){ |
2344 |
> |
while (left < right && |
2345 |
> |
(c = cmp.compare(pivot, a[left])) >= 0) { |
2346 |
|
if (c != 0) |
2347 |
|
sameLefts = false; |
2348 |
|
++left; |
2460 |
|
while (cmp.compare(pivot, a[right]) < 0) |
2461 |
|
--right; |
2462 |
|
int c; |
2463 |
< |
while (left < right && (c = cmp.compare(pivot, a[left])) >= 0){ |
2463 |
> |
while (left < right && |
2464 |
> |
(c = cmp.compare(pivot, a[left])) >= 0) { |
2465 |
|
if (c != 0) |
2466 |
|
sameLefts = false; |
2467 |
|
++left; |
2520 |
|
while (cmp.compare(pivot, a[right]) < 0) |
2521 |
|
--right; |
2522 |
|
int c; |
2523 |
< |
while (left < right && (c = cmp.compare(pivot, a[left])) >= 0){ |
2523 |
> |
while (left < right && |
2524 |
> |
(c = cmp.compare(pivot, a[left])) >= 0) { |
2525 |
|
if (c != 0) |
2526 |
|
sameLefts = false; |
2527 |
|
++left; |
2673 |
|
op.pushUp(par, par.left, par.right); |
2674 |
|
int refork = |
2675 |
|
((pb & CUMULATE) == 0 && |
2676 |
< |
par.lo == op.origin)? CUMULATE : 0; |
2676 |
> |
par.lo == op.origin) ? CUMULATE : 0; |
2677 |
|
int nextPhase = pb|cb|refork; |
2678 |
|
if (pb == nextPhase || |
2679 |
|
phaseUpdater.compareAndSet(par, pb, nextPhase)) { |