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

SCM Repository

[diderot] View of /tests/new-tests/slice-test.diderot
ViewVC logotype

View of /tests/new-tests/slice-test.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (download) (annotate)
Tue Sep 27 20:54:47 2016 UTC (2 years, 9 months ago) by glk
File size: 550 byte(s)
initial result of svn export --username anonsvn --password=anonsvn https://svn.smlnj-gforge.cs.uchicago.edu/svn/diderot/branches/vis15/src/tests/
#version 2.0

// test tensor indexing and slicing
//

input tensor[3] x = [1, 2, 3];
mat3 M = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ];
int g1 = 42;
int g2 = g1 + 1;
int step = 0;
bool flag = false;

initialize {
  print ("M = ", M, "\n");
}

strand S () {
  output real w = round(x[0] + x[1] * (M[1,:] • M[:, 2]));

  update {
    if (flag) { print ("bye\n"); } else { print ("hi\n"); }
    if (step == 0) {
	continue;
    } else {
      stabilize;
    }
    stabilize;
  }

}

update {
  step += 1;
}

create_collection { S() | i in 1..2, j in 1..2 }

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