summaryrefslogtreecommitdiff
path: root/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PlusPlus.scala
blob: 2574621212050b774bef7331a2fd5b895e9f051b (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
package scala.collection.parallel.benchmarks.parallel_array


import scala.collection.parallel.mutable.ParArray


object PlusPlus extends Companion {
  def benchName = "plusplus";
  def apply(sz: Int, parallelism: Int, what: String) = new PlusPlus(sz, parallelism, what)
  override def comparisons = List()
  override def defaultSize = 50000
}

class PlusPlus(sz: Int, p: Int, what: String)
extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) {
  def companion = PlusPlus
  
  val thatarr = new Array[Cont](sz)
  val thatpa = new ParArray[Cont](sz)
  
  def runpar = pa ++ thatpa
  def runseq = arr ++ thatarr
  def comparisonMap = collection.Map()
}