summaryrefslogtreecommitdiff
path: root/omega/examples/old_test/p.delft
blob: 27840a21cbbe349eb1cdf709170d0f9fcd6a82cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Generate local code for this HPF code fragment
# !HPF$ template T(0:150,0:150)
# !HPF$ align X(I,J) with T(3*I,3*J)
A := { [i,j] -> [3i,3j] };
# !HPF$ processors P(0:3, 0:3)
# !HPF$ distribute
# !HPF$  T(cyclic(4), cyclic(4)) onto P
D := { [t1,t2] -> [p1,p2,c1,c2,l1,l2] :
		t1 = 16c1+4p1+l1 
		&& t2 = 16c2+4p2+l2 
		&& 0 <= p1,p2 <= 3
		&& 0 <= l1,l2 <= 3 };
#      do I = 0, 14
#         Y(I,I) = 1.0
#      enddo
I := { [i] : 0 <= i <= 14 };
X := { [i] -> [i,i] };
R := D(A(X(I)));
R;
symbolic P1,P2;
selectLocal := {[P1,P2,c1,c2,l1,l2] -> [c1,c2,l1,l2]};
codegen selectLocal(R);