...
Code Block | ||||
---|---|---|---|---|
| ||||
//********************************************************************************
//
// ***** AUTO-GENERATED FILE DO NOT MODIFY! *****//
//
//********************************************************************************
import edu.rice.cnc.api._
import util.continuations.cps
class UserComputeStep() extends ComputeStep {
def compute(
tag: Point,
outPrimes: OutputCollection[Point, Int]
): Unit@cps[Any] = {
val number: Int = tag(0)
var factor: Int = 3
while (number % factor != 0) {
factor += 2
}
if (factor == number) {
outPrimes.put(tag, number)
}
}
} |
...