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

SCM Repository

[diderot] Annotation of /tests/new-tests/input-test.diderot
ViewVC logotype

Annotation of /tests/new-tests/input-test.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (view) (download)

1 : glk 4640 #version 2.0
2 :    
3 :     // test tensor indexing and slicing
4 :     //
5 :    
6 :     input real s = 1.2;
7 :     input bool b;
8 :     input tensor[3] x = [1, 2, 3];
9 :     input int[] iseq = load_sequence("ints.nrrd");
10 :    
11 :     initialize {
12 :     if (b) { print ("x = ", x, "\n"); }
13 :     }
14 :    
15 :     strand S (int k) {
16 :     output real w = s * real(iseq[k]);
17 :    
18 :     update {
19 :     stabilize;
20 :     }
21 :     }
22 :    
23 :     create_collection { S(i+j) | i in 1..2, j in 1..2 }

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