Created
July 23, 2012 01:34
-
-
Save snowmantw/3161609 to your computer and use it in GitHub Desktop.
DESL of asynchronous computation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compute | |
.init( {:Xa => xa, :domain => domain, :uid => uid} ) | |
.wait("resource.scalar_product.Ra_ra",:Ra, :ra) #1. | |
.compute(:Xa_, lambda{ |m| add(m[:Xa], m[:Ra], m[:domain]) } ) #2. | |
.send("resource.scalar_product.Xa_", :Xa_) #3. | |
.wait("resource.scalar_product.Xb_", :Xb_) #4. | |
.wait("resource.scalar_product.t", :t) #5. | |
.compute( :yA, lambda{ |m| t1 = trans(m[:Xb_], m[:domain]) | |
t2 = mul(m[:Ra],t1, m[:domain]) | |
t3 = sub(m[:t] ,t2, m[:domain]) }) #6. | |
.done() | |
.run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment