blob: aeed6949c7c26b3fbbf8d39cb26e7f8d4cdc3737 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
package scala.collection.parallel
import scala.collection.generic._
import scala.collection.parallel.mutable.ParArrayCombiner
import scala.collection.parallel.mutable.ParArray
/** A template trait for parallel iterable collections.
*
* $paralleliterableinfo
*
* $sideeffects
*
* @tparam T the element type of the collection
*
* @author Aleksandar Prokopec
* @since 2.9
*
* @define Coll ParIterable
* @define coll parallel iterable
*/
trait ParIterable[+T] extends Iterable[T]
with GenericParTemplate[T, ParIterable]
with ParIterableLike[T, ParIterable[T], Iterable[T]] {
override def companion: GenericCompanion[ParIterable] with GenericParCompanion[ParIterable] = ParIterable
}
/** $factoryInfo
*/
object ParIterable extends ParFactory[ParIterable] {
implicit def canBuildFrom[T]: CanCombineFrom[Coll, T, ParIterable[T]] = new GenericCanCombineFrom[T]
def newBuilder[T]: Combiner[T, ParIterable[T]] = ParArrayCombiner[T]
def newCombiner[T]: Combiner[T, ParIterable[T]] = ParArrayCombiner[T]
}
|