|
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 {
|
@@ -262,22 +257,14 @@ impl AutoDiffAttrs {
|
262 | 257 | !matches!(self.mode, DiffMode::Error | DiffMode::Source)
|
263 | 258 | }
|
264 | 259 |
|
265 |
| - pub fn into_item( |
266 |
| - self, |
267 |
| - source: String, |
268 |
| - target: String, |
269 |
| - inputs: Vec<TypeTree>, |
270 |
| - output: TypeTree, |
271 |
| - ) -> AutoDiffItem { |
272 |
| - AutoDiffItem { source, target, inputs, output, attrs: self } |
| 260 | + pub fn into_item(self, source: String, target: String) -> AutoDiffItem { |
| 261 | + AutoDiffItem { source, target, attrs: self } |
273 | 262 | }
|
274 | 263 | }
|
275 | 264 |
|
276 | 265 | impl fmt::Display for AutoDiffItem {
|
277 | 266 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
278 | 267 | 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) |
| 268 | + write!(f, " with attributes: {:?}", self.attrs) |
282 | 269 | }
|
283 | 270 | }
|
0 commit comments