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

SCM Repository

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

View of /branches/vis15/src/tests/new-tests/slice-test.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4497 - (download) (annotate)
Sat Sep 3 14:12:36 2016 UTC (2 years, 6 months ago) by jhr
File size: 550 byte(s)
  working on merge: updating tests with new version 2 syntax
#version 2.0

// test tensor indexing and slicing
//

input tensor[3] x = [1, 2, 3];
tensor[3,3] 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 = 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;
  }

}

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

update {
  step += 1;
}

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