Dave Hudak <[email protected]> wrote on 11/03/2010 10:36:34 AM:
>
> I am updating some X10 2.0.5 examples to work with 2.1.0.
>
> This code worked in 2.0.5 (compiled with -STATIC_CHECKS):
>
> val blockDist = Dist.makeBlock(R);
> val p0Dist = blockDist|here;
> val p0Region = p0Dist.region();
> for (p in p0Region) {
> Console.OUT.println("p0 = "+p);
> }
>
> When compiling under 2.1.0, I got the following error message:
> dhu...@oscnet166 185%> x10c++ -STATIC_CALLS -O -o Driver Counter.x10
> Driver.x10
> (Warning) Reached threshold when checking constraints. If type-checking
fails
> please insert a dynamic cast.
> Term: R
>
> ...now, I changed the code to pattern-match on the point that is
> iterating over the region:
> for ([p] in p0Region) {
> Console.OUT.println("p0 = "+p);
> }
>
> Is there some rationale behind this change or other more suitable
> code alteration I should be making?
Hi,
Thanks for opening the JIRA. A problem in the constraint system that
we need to look into.
Although the warning message was dire, the code actually compiled and
produced a correct executable (at least it did for me). I was able to
suppress the warning by giving an explicit type to blockDist:
val blockDist:Dist(R.rank) = Dist.makeBlock(R);
I think that's probably the work around for this I would recommend.
--dave
------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware,
phishing sites, and compromised hosts - saving your company time,
money, and embarrassment. Learn More!
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users