Skip to content

Commit

Permalink
Merge pull request #2 from arhik/main
Browse files Browse the repository at this point in the history
missing `where` args
  • Loading branch information
arhik committed Mar 13, 2024
2 parents c941403 + 2c11348 commit f56bdfb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/codegen/computeBlock.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ function computeBlock(scope, islaunch, wgSize, wgCount, fname, fargs)
fn = inferExpr(childScope, fname)
fa = map(x -> inferExpr(childScope, x), fargs)
fb = map(x -> inferExpr(childScope, x), fbody)
return ComputeBlock(fn, fa, WGPUVariable[], fb, childScope)
ta = map(x -> inferExpr(childScope, x), Targs)
return ComputeBlock(fn, fa, ta, fb, childScope)
end


3 changes: 2 additions & 1 deletion src/codegen/transpile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,6 @@ function transpile(scope::Scope, computeBlk::ComputeBlock)
fn = transpile(scope::Scope, computeBlk.fname)
fa = map(x -> transpile(scope, x), computeBlk.fargs)
fb = map(x -> transpile(scope, x), computeBlk.fbody)
return Expr(:function, Expr(:call, fn, fa...), quote $(fb...) end) |> MacroTools.striplines
ta = map(x -> transpile(scope, x), computeBlk.Targs)
return Expr(:function, Expr(:where, Expr(:call, fn, fa...), ta...), quote $(fb...) end) |> MacroTools.striplines
end

0 comments on commit f56bdfb

Please sign in to comment.