Skip to content

Commit

Permalink
fixed implicit arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
NeuralCoder3 committed Mar 15, 2023
1 parent 6fee15b commit 350c340
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions lit/core/pow.thorin
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
};
.con pow_else [] = {
.let b_1 = %core.wrap.sub 0 (b,1:I32);
f ((a,b_1),pow_cont)
pow ((a,b_1),pow_cont)
};
.let cmp = %core.icmp.e (b,0:I32);
((pow_else, pow_then)#cmp) ()
Expand All @@ -44,7 +44,7 @@
};


// CHECK-DAG: .con f_{{[0-9_]+}} _{{[0-9_]+}}::[b_{{[0-9_]+}}: .Idx 4294967296, ret_{{[0-9_]+}}: .Cn .Idx 4294967296]{{(@.*)?}}= {
// CHECK-DAG: .con pow_{{[0-9_]+}} _{{[0-9_]+}}::[b_{{[0-9_]+}}: .Idx 4294967296, ret_{{[0-9_]+}}: .Cn .Idx 4294967296]{{(@.*)?}}= {
// CHECK-DAG: .con ret_{{[0-9_]+}} _{{[0-9_]+}}: .Idx 4294967296{{(@.*)?}}= {
// CHECK-DAG: ret_{{[0-9_]+}} _{{[0-9_]+}}

Expand All @@ -57,7 +57,7 @@

// CHECK-DAG: .con pow_else_{{[0-9_]+}} []{{(@.*)?}}= {
// CHECK-DAG: .let _{{[0-9_]+}}: .Idx 4294967296 = %core.wrap.add 4294967296 0 (4294967295:(.Idx 4294967296), b_{{[0-9_]+}});
// CHECK-DAG: f_{{[0-9_]+}} (_{{[0-9_]+}}, pow_cont_{{[0-9_]+}})
// CHECK-DAG: pow_{{[0-9_]+}} (_{{[0-9_]+}}, pow_cont_{{[0-9_]+}})

// CHECK-DAG: .let _{{[0-9_]+}}: .Idx 2 = %core.icmp.xyglE 4294967296 (0:(.Idx 4294967296), b_{{[0-9_]+}});
// CHECK-DAG: (pow_else_{{[0-9_]+}}, pow_then_{{[0-9_]+}})#_{{[0-9_]+}} ()
Expand Down
4 changes: 2 additions & 2 deletions lit/matrix/mapReduce_mult.thorin
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
// .let MT = (2, (2,4), I32);

.con inner_fun [[mem:%mem.M, acc:I32, [a:I32, b:I32]], ret:.Cn[%mem.M,I32]] = {
.let v = %core.wrap.mul _32 0 (a,b);
.let v = %core.wrap.mul 0 (a,b);

// reduce op = addition
.let new_acc = %core.wrap.add _32 0 (acc,v);
.let new_acc = %core.wrap.add 0 (acc,v);

ret (mem, new_acc)
};
Expand Down
4 changes: 2 additions & 2 deletions lit/matrix/mapReduce_mult_init.thorin
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
// .let MT = (2, (2,4), I32);

.con fun [[mem:%mem.M, acc:I32, [a:I32, b:I32]], ret:.Cn[%mem.M,I32]] = {
.let v = %core.wrap.mul _32 0 (a,b);
.let v = %core.wrap.mul 0 (a,b);

// reduce op = addition
.let new_acc = %core.wrap.add _32 0 (acc,v);
.let new_acc = %core.wrap.add 0 (acc,v);

ret (mem, new_acc)
};
Expand Down
4 changes: 2 additions & 2 deletions lit/matrix/mapReduce_mult_init_ret.thorin
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
// .let MT = (2, (2,4), I32);

.con fun [[mem:%mem.M, acc:I32, [a:I32, b:I32]], ret:.Cn[%mem.M,I32]] = {
.let v = %core.wrap.mul _32 0 (a,b);
.let v = %core.wrap.mul 0 (a,b);

// reduce op = addition
.let new_acc = %core.wrap.add _32 0 (acc,v);
.let new_acc = %core.wrap.add 0 (acc,v);

ret (mem, new_acc)
};
Expand Down
4 changes: 2 additions & 2 deletions lit/matrix/mapReduce_zip_add.thorin
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
// .let MT = (2, (2,4), I32);

.con .extern fun [[mem:%mem.M, acc:I32, [a:I32, b:I32]], ret:.Cn[%mem.M,I32]] = {
.let v = %core.wrap.add _32 0 (a,b);
.let v = %core.wrap.add 0 (a,b);

// reduce op = addition
.let new_acc = %core.wrap.add _32 0 (acc,v);
.let new_acc = %core.wrap.add 0 (acc,v);

ret (mem, new_acc)
};
Expand Down
2 changes: 1 addition & 1 deletion lit/matrix/print_id_mat.thorin
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
]
= {
.let zero_64 = 0.0:(%math.F (52,11));
.let zero_real = %math.conv.f2f (52,11) (p,e) zero_64;
.let zero_real = %math.conv.f2f (p,e) zero_64;
ret (
%matrix.mapReduce
(2, (m, l), R,
Expand Down
4 changes: 2 additions & 2 deletions lit/matrix/read_mat2.thorin
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
[k:.Nat, l:.Nat],
return: .Cn[%mem.M, I32]] = {

.let two = %core.conv.u2u _32 k (2:I32);
.let three = %core.conv.u2u _32 l (3:I32);
.let two = %core.conv.u k (2:I32);
.let three = %core.conv.u l (3:I32);

.let (mem2, M) = %matrix.init (2,(k,l),I32,mem);
// :%matrix.Mat (2,(k,l),I32),
Expand Down

0 comments on commit 350c340

Please sign in to comment.