Hi all,

I was playing with Leader-follower zippered iterator. I have a counter
iterator given below. My aim is to make the leader send numbers low..high
one by one to follower which yield them , one by one. (Hope it is okay?)

//serial version
iter counter(low:int,high:int)
{
  writeln("This is from serial");
  for i in low..high do yield i;
}

//creating Leader-Follower
iter counter(param tag: iterKind,low:int,high:int) where tag ==
iterKind.leader
{
   writeln("This is from leader");

   for i in low..high
   {
   var r: range;
   r=i..i;
   r.stridable=false;
   yield r;
   }
}

iter counter(param tag: iterKind,low:int,high:int,followThis) where tag ==
iterKind.follower
{
  writeln("This is from follower");
   for i in followThis(1).translate(low) do yield i;
}



var A:[1..10] int;


forall (i,j) in zip(counter(21,30),A) do
j=i;
writeln("\n\nA after forall zippering is",A);


Which when compiled gave the error

myleaderfollower3.chpl:13: In iterator 'counter':
myleaderfollower3.chpl:24: internal error: PRI0162 chpl Version
1.12.0.2bb0f9c

Internal errors indicate a bug in the Chapel compiler ("It's us, not you"),
and we're sorry for the hassle.  We would appreciate your reporting this
bug --
please see http://chapel.cray.com/bugs.html for instructions.  In the
meantime,
the filename + line number above may be useful in working around the issue.

What's wrong?
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to