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

SCM Repository

[diderot] View of /branches/vis12/bugs/open/bug007.diderot
ViewVC logotype

View of /branches/vis12/bugs/open/bug007.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2821 - (download) (annotate)
Sun Nov 9 02:34:48 2014 UTC (5 years, 9 months ago) by jhr
File size: 651 byte(s)
  update Notes
// bug007.diderot
//
// This program tests the slicing syntax, but fails with
//
//   ../bin/diderotc --log bug007.diderot
//   uncaught exception Fail [Fail: unknown or incorrect operator Slice<tensor[2,3],:_>]
//     raised at common/phase-timer.sml:76.50-76.52
//     raised at common/phase-timer.sml:76.50-76.52
//     raised at c-util/tree-to-c.sml:281.26-283.19

tensor[2,3] x = [[0.0, 0.1, 0.2], [1.0, 1.1, 2.1]];
tensor[3] y = x[1,:];
tensor[2] z = x[:,0];
tensor[3,2] m = [x[:,0], x[:,1], x[:,2]];
real s = m[1, 0];
real a = m:m + x:x;

strand S ()
{
    output real dummy = s + a;
    update { stabilize; }
}

initially { S() | i in 1..2 };

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