ParSeqLike

trait ParSeqLike[+T, +CC <: ([X] =>> ParSeq[X]), +Repr <: ParSeq[T], +Sequential <: Seq[T] & SeqOps[T, AnyConstr, Sequential]] extends ParIterableLike[T, CC, Repr, Sequential] with Equals

A template trait for sequences of type ParSeq[T], representing parallel sequences with element type T.

A template trait for sequences of type ParSeq[T], representing parallel sequences with element type T.

Parallel sequences inherit the Seq trait. Their indexing and length computations are defined to be efficient. Like their sequential counterparts they always have a defined order of elements. This means they will produce resulting parallel sequences in the same way sequential sequences do. However, the order in which they perform bulk operations on elements to produce results is not defined and is generally nondeterministic. If the higher-order functions given to them produce no sideeffects, then this won't be noticeable.

Type Params
Repr

the type of the actual collection containing the elements

Sequential

the type of the sequential version of this parallel collection

T

the type of the elements contained in this collection

trait Equals
trait ParIterableLike[T, CC, Repr, Sequential]
trait HasNewCombiner[T, Repr]
trait Parallel
trait CustomParallelizable[T, Repr]
trait Parallelizable[T, Repr]
trait IterableOnce[T]
class Object
trait Matchable
class Any
trait ParSeq[T]
trait ParSeq[T]
class ParRange
class ParVector[T]
trait ParSeq[T]
class ParArray[T]

Type members

Classlikes

abstract protected class Elements(start: Int, val end: Int) extends SeqSplitter[T] with BufferedIterator[T]

Used to iterate elements using indices

Used to iterate elements using indices

protected trait ParSeqLikeAccessor[R, Tp] extends Accessor[R, Tp]
protected trait ParSeqLikeTransformer[R, Tp] extends ParSeqLikeAccessor[R, Tp] with Transformer[R, Tp]

Inherited classlikes

protected trait Accessor[R, Tp]

Standard accessor task that iterates over the elements of the collection.

Standard accessor task that iterates over the elements of the collection.

Type Params
R

type of the result of this method (R for result).

Tp

the representation type of the task at hand.

Inherited from
ParIterableLike
trait BuilderOps[Elem, To]
Inherited from
ParIterableLike
protected class Copy[U >: T, That](cfactory: CombinerFactory[U, That], val pit: IterableSplitter[T])
Inherited from
ParIterableLike
protected trait StrictSplitterCheckTask[R, Tp]
Inherited from
ParIterableLike
trait TaskOps[R, Tp]
Inherited from
ParIterableLike
protected trait Transformer[R, Tp]
Inherited from
ParIterableLike

Inherited types

type SSCTask[R, Tp] = StrictSplitterCheckTask[R, Tp]
Inherited from
ParIterableLike

Value members

Abstract methods

def apply(index: Int): T
def length: Int

Concrete methods

def +:[U >: T, That](elem: U): CC[U]
def :+[U >: T, That](elem: U): CC[U]
def canEqual(other: Any): Boolean
def corresponds[S](that: ParSeq[S])(p: (T, S) => Boolean): Boolean

Tests whether every element of this parallel iterable relates to the corresponding element of another parallel sequence by satisfying a test predicate.

Tests whether every element of this parallel iterable relates to the corresponding element of another parallel sequence by satisfying a test predicate.

This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

Type Params
S

the type of the elements of that

Value Params
p

the test predicate, which relates elements from both sequences

that

the other parallel sequence

Returns

true if both parallel sequences have the same length and p(x, y) is true for all corresponding elements x of this parallel iterable and y of that, otherwise false

def diff[U >: T](that: ParSeq[U]): Repr
def diff[U >: T](that: Seq[U]): Repr
def distinct: Repr

Builds a new parallel iterable from this parallel iterable without any duplicate elements.

Builds a new parallel iterable from this parallel iterable without any duplicate elements.

Note: will not terminate for infinite-sized collections.

This trait defines a new, more general split operation and reimplements the split operation of ParallelIterable trait using the new split operation.

Returns

A new parallel iterable which contains the first occurrence of every element of this parallel iterable.

def endsWith[S >: T](that: ParSeq[S]): Boolean

Tests whether this parallel iterable ends with the given parallel sequence.

Tests whether this parallel iterable ends with the given parallel sequence.

This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

Type Params
S

the type of the elements of that sequence

Value Params
that

the sequence to test

Returns

true if this parallel iterable has that as a suffix, false otherwise

def endsWith[S >: T](that: Iterable[S]): Boolean

Tests whether this parallel iterable ends with the given collection.

Tests whether this parallel iterable ends with the given collection.

This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

Type Params
S

the type of the elements of that sequence

Value Params
that

the sequence to test

Returns

true if this parallel iterable has that as a suffix, false otherwise

override def equals(that: Any): Boolean

The equals method for arbitrary parallel sequences. Compares this parallel sequence to some other object.

The equals method for arbitrary parallel sequences. Compares this parallel sequence to some other object.

Value Params
that

The object to compare the sequence to

Returns

true if that is a sequence that has the same elements as this sequence in the same order, false otherwise

Definition Classes
Equals -> Any
override def hashCode(): Int
Definition Classes
Any
def indexOf[B >: T](elem: B): Int

Finds index of first occurrence of some value in this parallel iterable.

Finds index of first occurrence of some value in this parallel iterable.

Type Params
B

the type of the element elem.

Value Params
elem

the element value to search for.

Returns

the index of the first element of this parallel iterable that is equal (as determined by ==) to elem, or -1, if none exists.

def indexOf[B >: T](elem: B, from: Int): Int

Finds index of first occurrence of some value in this parallel iterable after or at some start index.

Finds index of first occurrence of some value in this parallel iterable after or at some start index.

Type Params
B

the type of the element elem.

Value Params
elem

the element value to search for.

from

the start index

Returns

the index >= from of the first element of this parallel iterable that is equal (as determined by ==) to elem, or -1, if none exists.

def indexWhere(p: T => Boolean): Int

Finds index of first element satisfying some predicate.

Finds index of first element satisfying some predicate.

Note: may not terminate for infinite-sized collections.

Value Params
p

the predicate used to test elements.

Returns

the index of the first element of this parallel iterable that satisfies the predicate p, or -1, if none exists.

def indexWhere(p: T => Boolean, from: Int): Int

Finds the first element satisfying some predicate.

Finds the first element satisfying some predicate.

This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state.

The index flag is initially set to maximum integer value.

Value Params
from

the starting offset for the search

p

the predicate used to test the elements

Returns

the index >= from of the first element of this parallel iterable that satisfies the predicate p, or -1, if none exists

def intersect[U >: T](that: Seq[U]): Repr

Computes the multiset intersection between this parallel iterable and another sequence.

Computes the multiset intersection between this parallel iterable and another sequence.

Type Params
U

the element type of that parallel sequence

Value Params
that

the sequence of elements to intersect with.

Returns

a new collection of type That which contains all elements of this parallel iterable which also appear in that. If an element value x appears ''n'' times in that, then the first ''n'' occurrences of x will be retained in the result, but any following occurrences will be omitted.

def isDefinedAt(idx: Int): Boolean

Tests whether this parallel iterable contains given index.

Tests whether this parallel iterable contains given index.

The implementations of methods apply and isDefinedAt turn a ParSeq[T] into a PartialFunction[Int, T].

Value Params
idx

the index to test

Returns

true if this parallel iterable contains an element at position idx, false otherwise.

override def iterator: PreciseSplitter[T]
Definition Classes
ParIterableLike -> IterableOnce
def lastIndexOf[B >: T](elem: B): Int

Finds index of last occurrence of some value in this parallel iterable.

Finds index of last occurrence of some value in this parallel iterable.

Note: will not terminate for infinite-sized collections.

This trait defines a new, more general split operation and reimplements the split operation of ParallelIterable trait using the new split operation.

Type Params
B

the type of the element elem.

Value Params
elem

the element value to search for.

Returns

the index of the last element of this parallel iterable that is equal (as determined by ==) to elem, or -1, if none exists.

def lastIndexOf[B >: T](elem: B, end: Int): Int

Finds index of last occurrence of some value in this parallel iterable before or at a given end index.

Finds index of last occurrence of some value in this parallel iterable before or at a given end index.

Type Params
B

the type of the element elem.

Value Params
elem

the element value to search for.

end

the end index.

Returns

the index <= end of the last element of this parallel iterable that is equal (as determined by ==) to elem, or -1, if none exists.

def lastIndexWhere(p: T => Boolean): Int

Finds index of last element satisfying some predicate.

Finds index of last element satisfying some predicate.

Note: will not terminate for infinite-sized collections.

This trait defines a new, more general split operation and reimplements the split operation of ParallelIterable trait using the new split operation.

Value Params
p

the predicate used to test elements.

Returns

the index of the last element of this parallel iterable that satisfies the predicate p, or -1, if none exists.

def lastIndexWhere(p: T => Boolean, end: Int): Int

Finds the last element satisfying some predicate.

Finds the last element satisfying some predicate.

This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state.

The index flag is initially set to minimum integer value.

Value Params
end

the maximum offset for the search

p

the predicate used to test the elements

Returns

the index <= end of the first element of this parallel iterable that satisfies the predicate p, or -1, if none exists

def padTo[U >: T](len: Int, elem: U): CC[U]
def patch[U >: T](from: Int, patch: Seq[U], replaced: Int): CC[U]

Overload of ''patch'' that takes a sequential collection as parameter

Overload of ''patch'' that takes a sequential collection as parameter

def patch[U >: T](from: Int, patch: ParSeq[U], replaced: Int): CC[U]
def prefixLength(p: T => Boolean): Int

Returns the length of the longest prefix whose elements all satisfy some predicate.

Returns the length of the longest prefix whose elements all satisfy some predicate.

Note: may not terminate for infinite-sized collections.

Value Params
p

the predicate used to test elements.

Returns

the length of the longest prefix of this parallel iterable such that every element of the segment satisfies the predicate p.

def reverse: Repr
def reverseMap[S](f: T => S): CC[S]
override def sameElements[U >: T](that: IterableOnce[U]): Boolean
Definition Classes
def segmentLength(p: T => Boolean, from: Int): Int

Returns the length of the longest segment of elements starting at a given position satisfying some predicate.

Returns the length of the longest segment of elements starting at a given position satisfying some predicate.

This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state.

The index flag is initially set to maximum integer value.

Value Params
from

the starting offset for the search

p

the predicate used to test the elements

Returns

the length of the longest segment of elements starting at from and satisfying the predicate

final def size: Int
def startsWith[S >: T](that: IterableOnce[S], offset: Int): Boolean

Tests whether this parallel iterable contains the given sequence at a given index.

Tests whether this parallel iterable contains the given sequence at a given index.

This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

Type Params
S

the element type of that parallel sequence

Value Params
offset

the starting offset for the search

that

the parallel sequence this sequence is being searched for

Returns

true if there is a sequence that starting at offset in this sequence, false otherwise

override def toSeq: ParSeq[T]
Definition Classes
override def toString: String
Definition Classes
def union[B >: T](that: ParSeq[B]): CC[B]

Produces a new sequence which contains all elements of this parallel iterable and also all elements of a given sequence. xs union ys is equivalent to xs ++ ys.

Produces a new sequence which contains all elements of this parallel iterable and also all elements of a given sequence. xs union ys is equivalent to xs ++ ys.

Another way to express this is that xs union ys computes the order-preserving multi-set union of xs and ys. union is hence a counter-part of diff and intersect which also work on multi-sets.

Note: will not terminate for infinite-sized collections.

This trait defines a new, more general split operation and reimplements the split operation of ParallelIterable trait using the new split operation.

Type Params
B

the element type of the returned parallel iterable.

Value Params
that

the sequence to add.

Returns

a new parallel iterable which contains all elements of this parallel iterable followed by all elements of that.

def union[B >: T](that: Seq[B]): CC[B]

Overload of ''union'' that takes a sequential collection as parameter

Overload of ''union'' that takes a sequential collection as parameter

def updated[U >: T](index: Int, elem: U): CC[U]
override def zip[U >: T, S](that: ParIterable[S]): CC[(U, S)]
Definition Classes

Inherited methods

def ++[U >: T](that: IterableOnce[U]): CC[U]
Inherited from
ParIterableLike
def /:[S](z: S)(op: (S, T) => S): S
Inherited from
ParIterableLike
def :\[S](z: S)(op: (T, S) => S): S
Inherited from
ParIterableLike
def aggregate[S](z: => S)(seqop: (S, T) => S, combop: (S, S) => S): S

Aggregates the results of applying an operator to subsequent elements.

Aggregates the results of applying an operator to subsequent elements.

This is a more general form of fold and reduce. It has similar semantics, but does not require the result to be a supertype of the element type. It traverses the elements in different partitions sequentially, using seqop to update the result, and then applies combop to results from different partitions. The implementation of this operation may operate on an arbitrary number of collection partitions, so combop may be invoked arbitrary number of times.

For example, one might want to process some elements and then produce a Set. In this case, seqop would process an element and append it to the set, while combop would concatenate two sets from different partitions together. The initial value z would be an empty set.

  pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)

Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).

Type Params
S

the type of accumulated results

Value Params
combop

an associative operator used to combine results from different partitions

seqop

an operator used to accumulate results within a partition

z

the initial value for the accumulated result of the partition - this will typically be the neutral element for the seqop operator (e.g. Nil for list concatenation or 0 for summation) and may be evaluated more than once

Inherited from
ParIterableLike
def collect[S](pf: PartialFunction[T, S]): CC[S]
Inherited from
ParIterableLike
def copyToArray[U >: T](xs: Array[U], start: Int, len: Int): Unit
Inherited from
ParIterableLike
def copyToArray[U >: T](xs: Array[U], start: Int): Unit
Inherited from
ParIterableLike
def copyToArray[U >: T](xs: Array[U]): Unit
Inherited from
ParIterableLike
def count(p: T => Boolean): Int
Inherited from
ParIterableLike
def debugBuffer: ArrayBuffer[String]
Inherited from
ParIterableLike
def drop(n: Int): Repr
Inherited from
ParIterableLike
def dropWhile(pred: T => Boolean): Repr

Drops all elements in the longest prefix of elements that satisfy the predicate, and returns a collection composed of the remaining elements.

Drops all elements in the longest prefix of elements that satisfy the predicate, and returns a collection composed of the remaining elements.

This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state. The index flag is initially set to maximum integer value.

Value Params
pred

the predicate used to test the elements

Returns

a collection composed of all the elements after the longest prefix of elements in this parallel iterable that satisfy the predicate pred

Inherited from
ParIterableLike
def exists(p: T => Boolean): Boolean

Tests whether a predicate holds for some element of this parallel iterable.

Tests whether a predicate holds for some element of this parallel iterable.

This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

Value Params
p

a predicate used to test elements

Returns

true if p holds for some element, false otherwise

Inherited from
ParIterableLike
def filter(pred: T => Boolean): Repr
Inherited from
ParIterableLike
def filterNot(pred: T => Boolean): Repr
Inherited from
ParIterableLike
def find(p: T => Boolean): Option[T]

Finds some element in the collection for which the predicate holds, if such an element exists. The element may not necessarily be the first such element in the iteration order.

Finds some element in the collection for which the predicate holds, if such an element exists. The element may not necessarily be the first such element in the iteration order.

If there are multiple elements obeying the predicate, the choice is nondeterministic.

This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

Value Params
p

predicate used to test the elements

Returns

an option value with the element if such an element exists, or None otherwise

Inherited from
ParIterableLike
def flatMap[S](f: T => IterableOnce[S]): CC[S]
Inherited from
ParIterableLike
def fold[U >: T](z: U)(op: (U, U) => U): U

Folds the elements of this sequence using the specified associative binary operator. The order in which the elements are reduced is unspecified and may be nondeterministic.

Folds the elements of this sequence using the specified associative binary operator. The order in which the elements are reduced is unspecified and may be nondeterministic.

Note this method has a different signature than the foldLeft and foldRight methods of the trait Traversable. The result of folding may only be a supertype of this parallel collection's type parameter T.

Type Params
U

a type parameter for the binary operator, a supertype of T.

Value Params
op

a binary operator that must be associative

z

a neutral element for the fold operation, it may be added to the result an arbitrary number of times, not changing the result (e.g. Nil for list concatenation, 0 for addition, or 1 for multiplication)

Returns

the result of applying fold operator op between all the elements and z

Inherited from
ParIterableLike
def foldLeft[S](z: S)(op: (S, T) => S): S
Inherited from
ParIterableLike
def foldRight[S](z: S)(op: (T, S) => S): S
Inherited from
ParIterableLike
def forall(p: T => Boolean): Boolean

Tests whether a predicate holds for all elements of this parallel iterable.

Tests whether a predicate holds for all elements of this parallel iterable.

This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

Value Params
p

a predicate used to test elements

Returns

true if p holds for all elements, false otherwise

Inherited from
ParIterableLike
def foreach[U](f: T => U): Unit

Applies a function f to all the elements of parallel iterable in an undefined order.

Applies a function f to all the elements of parallel iterable in an undefined order.

Type Params
U

the result type of the function applied to each element, which is always discarded

Value Params
f

function applied to each element

Inherited from
ParIterableLike
def groupBy[K](f: T => K): ParMap[K, Repr]
Inherited from
ParIterableLike
def hasDefiniteSize: Boolean
Inherited from
ParIterableLike
def head: T
Inherited from
ParIterableLike
def headOption: Option[T]
Inherited from
ParIterableLike
def init: Repr
Inherited from
ParIterableLike
protected def initTaskSupport(): Unit
Inherited from
ParIterableLike
def isEmpty: Boolean
Inherited from
ParIterableLike

Denotes whether this parallel collection has strict splitters.

Denotes whether this parallel collection has strict splitters.

This is true in general, and specific collection instances may choose to override this method. Such collections will fail to execute methods which rely on splitters being strict, i.e. returning a correct value in the remaining method.

This method helps ensure that such failures occur on method invocations, rather than later on and in unpredictable ways.

Inherited from
ParIterableLike
final def isTraversableAgain: Boolean
Inherited from
ParIterableLike
def knownSize: Int
Inherited from
IterableOnce
def last: T
Inherited from
ParIterableLike
def lastOption: Option[T]
Inherited from
ParIterableLike
def map[S](f: T => S): CC[S]
Inherited from
ParIterableLike
def max[U >: T](ord: Ordering[U]): T
Inherited from
ParIterableLike
def maxBy[S](f: T => S)(cmp: Ordering[S]): T
Inherited from
ParIterableLike
def min[U >: T](ord: Ordering[U]): T
Inherited from
ParIterableLike
def minBy[S](f: T => S)(cmp: Ordering[S]): T
Inherited from
ParIterableLike
def mkString: String
Inherited from
ParIterableLike
def mkString(sep: String): String
Inherited from
ParIterableLike
def mkString(start: String, sep: String, end: String): String
Inherited from
ParIterableLike
def nonEmpty: Boolean
Inherited from
ParIterableLike
override def par: Repr
def partition(pred: T => Boolean): (Repr, Repr)
Inherited from
ParIterableLike
def product[U >: T](num: Numeric[U]): U
Inherited from
ParIterableLike
def reduce[U >: T](op: (U, U) => U): U

Reduces the elements of this sequence using the specified associative binary operator.

Reduces the elements of this sequence using the specified associative binary operator.

The order in which operations are performed on elements is unspecified and may be nondeterministic.

Note this method has a different signature than the reduceLeft and reduceRight methods of the trait Traversable. The result of reducing may only be a supertype of this parallel collection's type parameter T.

Type Params
U

A type parameter for the binary operator, a supertype of T.

Value Params
op

A binary operator that must be associative.

Returns

The result of applying reduce operator op between all the elements if the collection is nonempty.

Throws
UnsupportedOperationException

if this parallel iterable is empty.

Inherited from
ParIterableLike
def reduceLeft[U >: T](op: (U, T) => U): U
Inherited from
ParIterableLike
def reduceLeftOption[U >: T](op: (U, T) => U): Option[U]
Inherited from
ParIterableLike
def reduceOption[U >: T](op: (U, U) => U): Option[U]

Optionally reduces the elements of this sequence using the specified associative binary operator.

Optionally reduces the elements of this sequence using the specified associative binary operator.

The order in which operations are performed on elements is unspecified and may be nondeterministic.

Note this method has a different signature than the reduceLeftOption and reduceRightOption methods of the trait Traversable. The result of reducing may only be a supertype of this parallel collection's type parameter T.

Type Params
U

A type parameter for the binary operator, a supertype of T.

Value Params
op

A binary operator that must be associative.

Returns

An option value containing result of applying reduce operator op between all the elements if the collection is nonempty, and None otherwise.

Inherited from
ParIterableLike
def reduceRight[U >: T](op: (T, U) => U): U
Inherited from
ParIterableLike
def reduceRightOption[U >: T](op: (T, U) => U): Option[U]
Inherited from
ParIterableLike
def repr: Repr
Inherited from
ParIterableLike
protected def reuse[S, That](oldc: Option[Combiner[S, That]], newc: Combiner[S, That]): Combiner[S, That]

Optionally reuses an existing combiner for better performance. By default it doesn't - subclasses may override this behaviour. The provided combiner oldc that can potentially be reused will be either some combiner from the previous computational task, or None if there was no previous phase (in which case this method must return newc).

Optionally reuses an existing combiner for better performance. By default it doesn't - subclasses may override this behaviour. The provided combiner oldc that can potentially be reused will be either some combiner from the previous computational task, or None if there was no previous phase (in which case this method must return newc).

Value Params
newc

The new, empty combiner that can be used.

oldc

The combiner that is the result of the previous task, or None if there was no previous task.

Returns

Either newc or oldc.

Inherited from
ParIterableLike
def scan[U >: T](z: U)(op: (U, U) => U): CC[U]

Computes a prefix scan of the elements of the collection.

Computes a prefix scan of the elements of the collection.

Note: The neutral element z may be applied more than once.

Type Params
U

element type of the resulting collection

Value Params
op

the associative operator for the scan

z

neutral element for the operator op

Returns

a new parallel iterable containing the prefix scan of the elements in this parallel iterable

Inherited from
ParIterableLike
def scanLeft[S](z: S)(op: (S, T) => S): Iterable[S]
Inherited from
ParIterableLike
def scanRight[S](z: S)(op: (T, S) => S): Iterable[S]
Inherited from
ParIterableLike
def seq: Sequential
Inherited from
ParIterableLike
def slice(unc_from: Int, unc_until: Int): Repr
Inherited from
ParIterableLike
def span(pred: T => Boolean): (Repr, Repr)

Splits this parallel iterable into a prefix/suffix pair according to a predicate.

Splits this parallel iterable into a prefix/suffix pair according to a predicate.

This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state. The index flag is initially set to maximum integer value.

Value Params
pred

the predicate used to test the elements

Returns

a pair consisting of the longest prefix of the collection for which all the elements satisfy pred, and the rest of the collection

Inherited from
ParIterableLike
def splitAt(n: Int): (Repr, Repr)
Inherited from
ParIterableLike
def stepper[S <: Stepper[_]](shape: StepperShape[T, S]): S
Inherited from
IterableOnce
def stringPrefix: String
Inherited from
ParIterableLike
def sum[U >: T](num: Numeric[U]): U
Inherited from
ParIterableLike
def tail: Repr
Inherited from
ParIterableLike
def take(n: Int): Repr
Inherited from
ParIterableLike
def takeWhile(pred: T => Boolean): Repr

Takes the longest prefix of elements that satisfy the predicate.

Takes the longest prefix of elements that satisfy the predicate.

This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state. The index flag is initially set to maximum integer value.

Value Params
pred

the predicate used to test the elements

Returns

the longest prefix of this parallel iterable of elements that satisfy the predicate pred

Inherited from
ParIterableLike

The task support object which is responsible for scheduling and load-balancing tasks to processors.

The task support object which is responsible for scheduling and load-balancing tasks to processors.

See also
Inherited from
ParIterableLike
def tasksupport_=(ts: TaskSupport): Unit

Changes the task support object which is responsible for scheduling and load-balancing tasks to processors.

Changes the task support object which is responsible for scheduling and load-balancing tasks to processors.

A task support object can be changed in a parallel collection after it has been created, but only during a quiescent period, i.e. while there are no concurrent invocations to parallel collection methods.

Here is a way to change the task support of a parallel collection:

import scala.collection.parallel._
val pc = mutable.ParArray(1, 2, 3)
pc.tasksupport = new ForkJoinTaskSupport(
  new java.util.concurrent.ForkJoinPool(2))
See also
Inherited from
ParIterableLike
def to[C](factory: Factory[T, C]): C
Inherited from
ParIterableLike
def toArray[U >: T](`evidence$1`: ClassTag[U]): Array[U]
Inherited from
ParIterableLike
def toBuffer[U >: T]: Buffer[U]
Inherited from
ParIterableLike
def toIndexedSeq: IndexedSeq[T]
Inherited from
ParIterableLike
Inherited from
ParIterableLike
def toIterator: Iterator[T]
Inherited from
ParIterableLike
def toList: List[T]
Inherited from
ParIterableLike
def toMap[K, V](ev: T <:< (K, V)): ParMap[K, V]
Inherited from
ParIterableLike
protected def toParCollection[U >: T, That](cbf: () => Combiner[U, That]): That
Inherited from
ParIterableLike
protected def toParMap[K, V, That](cbf: () => Combiner[(K, V), That])(ev: T <:< (K, V)): That
Inherited from
ParIterableLike
def toSet[U >: T]: ParSet[U]
Inherited from
ParIterableLike
def toVector: Vector[T]
Inherited from
ParIterableLike
def withFilter(pred: T => Boolean): Repr
Inherited from
ParIterableLike
protected def wrap[R](body: => R): NonDivisible[R]
Inherited from
ParIterableLike
def zip[U >: T, S](that: Iterable[S]): CC[(U, S)]
Inherited from
ParIterableLike
def zipAll[S, U >: T](that: ParIterable[S], thisElem: U, thatElem: S): CC[(U, S)]
Inherited from
ParIterableLike
def zipWithIndex[U >: T]: CC[(U, Int)]

Zips this parallel iterable with its indices.

Zips this parallel iterable with its indices.

Type Params
U

the type of the first half of the returned pairs (this is always a supertype of the collection's element type T).

Returns

A new collection of type ParIterable containing pairs consisting of all elements of this parallel iterable paired with their index. Indices start at 0.

Inherited from
ParIterableLike

Deprecated and Inherited methods

@deprecated("Use `to(LazyList)` instead.", "0.1.3")
def toStream: Stream[T]
Deprecated
Inherited from
ParIterableLike
@deprecated("Use `toIterable` instead", "0.1.3")
Deprecated
Inherited from
ParIterableLike

Implicits

Inherited implicits

implicit protected def builder2ops[Elem, To](cb: Builder[Elem, To]): BuilderOps[Elem, To]
Inherited from
ParIterableLike
implicit protected def delegatedSignalling2ops[PI <: DelegatedSignalling](it: PI): SignallingOps[PI]
Inherited from
ParIterableLike
implicit protected def task2ops[R, Tp](tsk: StrictSplitterCheckTask[R, Tp]): TaskOps[R, Tp]
Inherited from
ParIterableLike