Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis15/src/tests/rtest/tests/foreach2/foreach2.diderot
ViewVC logotype

View of /branches/vis15/src/tests/rtest/tests/foreach2/foreach2.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4499 - (download) (annotate)
Sat Sep 3 15:43:37 2016 UTC (2 years, 10 months ago) by jhr
File size: 359 byte(s)
working on merge: fixing some syntax errors in tests
#version 2.0

// like test-foreach1.diderot, except we use a dynamic sequence
//

int[] indices = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};

strand Particle (real i)
{
    output real out = i;
    update
    {
        foreach (int i in indices)
        {
            out += real(i);
        }
        stabilize;
    }
}

create_array { Particle(real(n)) | n in 1..10 }

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0