-
Notifications
You must be signed in to change notification settings - Fork 14
feat!: Extend LowerTypes pass to linearize by inserting copy/discard #2018
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
Changes from 1 commit
937cd14
815536b
cc1e8f2
4888184
7002e4d
6cc7cea
d43784b
422c496
76ed391
ed5b5dd
adcbbf6
d84ae4e
bfa52cf
b373571
a8e613a
24ed15c
9153fcf
a89879c
c78d88a
bf6a9a4
5ecd9e6
d9a6d29
83e798e
84fe82d
6168353
fcb85a2
0f9aa17
74c6775
00fd284
9f02acf
a0ac6d6
6ac9efc
044ff32
b539e2f
2c7e035
6b190a6
bd24d1a
a5d8b65
6b1438c
d1036bc
d19dc5a
d0fddde
3494887
ffdcaf2
6f8f43c
e3da259
28f2470
bef90b0
85df7ff
507f027
bae0ebe
8fa79bd
6a186a5
6d8a89b
3f0f1e6
974a25b
2bbf663
290a8ae
19b1442
269f0f1
f6a1af5
ac9adac
65eaf52
354a89c
1b31631
d5cbd58
63bdd3b
1ac3728
e768814
506570b
0958e2a
74cfdb1
dc79c93
63d24b0
ba63fbe
2c7bb80
08d3227
dedc3d5
9993467
cc81d87
74c6492
18316de
520e414
0814bf2
0a82fef
94c0ff3
e9ff81c
cf6451f
9a355d5
ec2d0ba
c9d7033
812ac89
ae7bd6e
e0937ee
36df03c
71f8c0b
dc0c7dd
31ba4e0
86c73ed
92d7a51
582b9f1
95da97d
c7e56e6
a1e63de
7634e92
0cd31e0
65b8993
198f990
517cd0d
272f024
e74b12b
34bd90d
a2cba09
3084004
cec9162
bf74996
221bf7d
f6312bc
5fe25c0
edd2126
5ea9763
cc4fd68
8a1ff0c
d5e4ac3
b259426
a14fafa
a4686d3
1abf1b4
7e3efcc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,14 +80,14 @@ impl Linearizer { | |
pub fn register_parametric( | ||
|
||
&mut self, | ||
src: &TypeDef, | ||
copy_fn: Box<dyn Fn(&[TypeArg], &Linearizer) -> Result<OpReplacement, LinearizeError>>, | ||
discard_fn: Box<dyn Fn(&[TypeArg], &Linearizer) -> Result<OpReplacement, LinearizeError>>, | ||
copy_fn: impl Fn(&[TypeArg], &Linearizer) -> Result<OpReplacement, LinearizeError> + 'static, | ||
discard_fn: impl Fn(&[TypeArg], &Linearizer) -> Result<OpReplacement, LinearizeError> + 'static, | ||
) { | ||
// We could look for `src`s TypeDefBound being explicit Copyable, otherwise | ||
// it depends on the arguments. Since there is no method to get the TypeDefBound | ||
// from a TypeDef, leaving this for now. | ||
self.copy_discard_parametric | ||
.insert(src.into(), (Arc::from(copy_fn), Arc::from(discard_fn))); | ||
.insert(src.into(), (Arc::new(copy_fn), Arc::new(discard_fn))); | ||
} | ||
|
||
/// Insert copy or discard operations (as appropriate) enough to wire `src_port` of `src_node` | ||
|
Uh oh!
There was an error while loading. Please reload this page.