Skip to content

Commit

Permalink
Fixed thunkAssign to reflect changes
Browse files Browse the repository at this point in the history
Turns out that `thunkAssign` already subtracted `1`, so the new
generated code was subtracting it twice. This code should resolve that issue.
  • Loading branch information
B-rando1 committed Jan 1, 2025
1 parent 4638f89 commit 3c4355e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ instance ThunkAssign JuliaCode where
iName <- genLoopIndex
let
i = var iName int
dim = fmap pure $ t >>= commonThunkDim (fmap unJLC . (\l -> listSize l #- litInt 1) . fmap pure) . unJLC
dim = fmap pure $ t >>= commonThunkDim (fmap unJLC . listSize . fmap pure) . unJLC
loopInit = zoom lensMStoVS (fmap unJLC t) >>= commonThunkElim
(const emptyStmt) (const $ assign v $ litZero $ fmap variableType v)
loopBody = zoom lensMStoVS (fmap unJLC t) >>= commonThunkElim
Expand Down
4 changes: 2 additions & 2 deletions code/stable/gooltest/julia/VectorTest/VectorTest.jl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3c4355e

Please sign in to comment.