Friday, November 30, 2007

Groovy equivalence to Chapel's code

Ability to have our own DSL in Groovy makes it possible to have a high-level language for parallel computing. I'm trying to clone all features of Chapel to Groovy and then optimise the generated codes to make it run (I hope) fast.


int n = 1000
def A = new Vector(size: n)
def B = new Vector(size: n)
forall(2..n-1) { i ->
B[i] = ((A[i-1] + A[i+1])) / 2
}

No comments: