Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] Add a lower-level IR for C++ code generation #1233

Merged
merged 36 commits into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b2753b8
Add C++ IR
WardBrian Jul 29, 2022
6950b57
Re-implement codegen using IR
WardBrian Jul 29, 2022
cb7b9c3
Remove former codegen files
WardBrian Jul 29, 2022
d09ec12
Update test output
WardBrian Jul 29, 2022
0b0711a
Clean up
WardBrian Jul 29, 2022
eb52cb8
Fix whitespace sensitive js test
WardBrian Jul 29, 2022
00caf29
Dune promote whitespace changes
WardBrian Jul 29, 2022
d85e651
Fix newline issue in strings
WardBrian Jul 30, 2022
37875d9
Fix missing complex type and overloading templates
WardBrian Jul 30, 2022
922523d
Tweak output formatting, clean up name code
WardBrian Aug 1, 2022
47dc485
Doc comments
WardBrian Aug 2, 2022
83bd5ec
Merge branch 'master' into refactor/cpp-ir
WardBrian Sep 22, 2022
22038c9
Rename backend helper str_array
WardBrian Sep 29, 2022
0f88296
Merge branch 'master' into refactor/cpp-ir
WardBrian Sep 29, 2022
c40cf8e
Merge branch 'master' into refactor/cpp-ir
WardBrian Oct 12, 2022
eb1f2ce
Documentation
WardBrian Oct 13, 2022
1154271
Merge branch 'master' into refactor/cpp-ir
WardBrian Oct 14, 2022
298a65e
Merge branch 'master' into refactor/cpp-ir
WardBrian Oct 20, 2022
7ffde75
Changes per first round of review
WardBrian Oct 21, 2022
4c60589
Merge branch 'master' into refactor/cpp-ir
WardBrian Oct 24, 2022
2af9803
Merge branch 'master'
WardBrian Oct 24, 2022
8aa1188
Merge branch 'master' into refactor/cpp-ir
WardBrian Oct 24, 2022
667ec62
Dune promote
WardBrian Oct 24, 2022
0cff4a9
Fix typo
WardBrian Oct 24, 2022
45fdbb3
Minor renames
WardBrian Oct 25, 2022
e3e0772
Merge branch 'master' into refactor/cpp-ir
WardBrian Nov 2, 2022
9038698
Merge branch 'master' into refactor/cpp-ir
WardBrian Nov 4, 2022
e656722
Only rename in one place
WardBrian Nov 7, 2022
8aac0dd
Merge branch 'master' into refactor/cpp-ir
WardBrian Nov 7, 2022
59f0f12
Merge branch 'master' into refactor/cpp-ir
WardBrian Nov 8, 2022
9c21501
Merge branch 'master' into refactor/cpp-ir
WardBrian Dec 12, 2022
5d63be4
Changes per review
WardBrian Dec 15, 2022
48761f0
Move map_rect numbering to Locations
WardBrian Dec 15, 2022
fccc948
Move map_rect registration to Locations, rename Locations pass to Num…
WardBrian Dec 15, 2022
844439e
Changes per review
WardBrian Dec 16, 2022
55eb5dd
Changes per review
WardBrian Dec 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
664 changes: 664 additions & 0 deletions src/stan_math_backend/Cpp.ml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/stan_math_backend/Cpp_Json.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ module Str = Re.Str

let rec sizedtype_to_json (st : Expr.Typed.t SizedType.t) : Yojson.Basic.t =
let emit_cpp_expr e =
Fmt.str "+ std::to_string(%a) +" Expression_gen.pp_expr e in
Fmt.str "+ std::to_string(%a) +" Cpp.Printing.pp_expr
(Lower_expr.lower_expr e) in
match st with
| SInt -> `Assoc [("name", `String "int")]
| SReal -> `Assoc [("name", `String "real")]
Expand Down
680 changes: 0 additions & 680 deletions src/stan_math_backend/Expression_gen.ml

This file was deleted.

Loading