|
6 | 6 | use std::fmt::{self, Display, Formatter};
|
7 | 7 | use std::str::FromStr;
|
8 | 8 |
|
9 |
| -use crate::expand::typetree::TypeTree; |
10 | 9 | use crate::expand::{Decodable, Encodable, HashStable_Generic};
|
11 | 10 | use crate::ptr::P;
|
12 | 11 | use crate::{Ty, TyKind};
|
@@ -79,10 +78,6 @@ pub struct AutoDiffItem {
|
79 | 78 | /// The name of the function being generated
|
80 | 79 | pub target: String,
|
81 | 80 | pub attrs: AutoDiffAttrs,
|
82 |
| - /// Describe the memory layout of input types |
83 |
| - pub inputs: Vec<TypeTree>, |
84 |
| - /// Describe the memory layout of the output type |
85 |
| - pub output: TypeTree, |
86 | 81 | }
|
87 | 82 | #[derive(Clone, Eq, PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
|
88 | 83 | pub struct AutoDiffAttrs {
|
@@ -266,18 +261,14 @@ impl AutoDiffAttrs {
|
266 | 261 | self,
|
267 | 262 | source: String,
|
268 | 263 | target: String,
|
269 |
| - inputs: Vec<TypeTree>, |
270 |
| - output: TypeTree, |
271 | 264 | ) -> AutoDiffItem {
|
272 |
| - AutoDiffItem { source, target, inputs, output, attrs: self } |
| 265 | + AutoDiffItem { source, target, attrs: self } |
273 | 266 | }
|
274 | 267 | }
|
275 | 268 |
|
276 | 269 | impl fmt::Display for AutoDiffItem {
|
277 | 270 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
278 | 271 | write!(f, "Differentiating {} -> {}", self.source, self.target)?;
|
279 |
| - write!(f, " with attributes: {:?}", self.attrs)?; |
280 |
| - write!(f, " with inputs: {:?}", self.inputs)?; |
281 |
| - write!(f, " with output: {:?}", self.output) |
| 272 | + write!(f, " with attributes: {:?}", self.attrs) |
282 | 273 | }
|
283 | 274 | }
|
0 commit comments