Skip to content

Commit

Permalink
2D Loop transfer codegen (proto, unfinished)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpervan committed Oct 22, 2023
1 parent 67200e1 commit e2a899e
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,18 @@ class AcceleratorCodeGenerator(override val decls: C.Compilation.CodeGenerator.D
offsetX: Int, offsetY: Int): Stmt = {
val firstVar = freshName("dma2d_")
val secondVar = freshName("dma2d_")

/*C.AST.FunDecl(
name="ex_mapfor",
returnType = C.AST.Type.void,
params = Seq(
C.AST.ParamDecl("output", C.AST.PointerType(C.AST.Type.int)),
C.AST.ParamDecl("n446", C.AST.Type.int),
C.AST.ParamDecl("e447", C.AST.PointerType(C.AST.Type.int))
),
body = C.AST.Stmts(C.AST.Code("asdf"), C.AST.ForLoop(???, ???, ???, ???))
)*/

C.AST.ForLoop(
init = C.AST.DeclStmt(C.AST.VarDecl(firstVar, C.AST.Type.int, None)),
cond = C.AST.BinaryExpr(C.AST.Literal(firstVar), C.AST.BinaryOperator.<, C.AST.Literal(width.toString)),
Expand Down

0 comments on commit e2a899e

Please sign in to comment.