don't partially regen derivative_cache if derivative is disabled
This commit is contained in:
parent
21e56cac4d
commit
25c4285fc0
@ -130,6 +130,7 @@ impl FunctionEntry {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if self.derivative_cache.is_some() {
|
if self.derivative_cache.is_some() {
|
||||||
|
if self.derivative {
|
||||||
let derivative_cache = self.derivative_cache.as_ref().unwrap();
|
let derivative_cache = self.derivative_cache.as_ref().unwrap();
|
||||||
|
|
||||||
self.derivative_cache = Some(
|
self.derivative_cache = Some(
|
||||||
@ -144,6 +145,9 @@ impl FunctionEntry {
|
|||||||
})
|
})
|
||||||
.collect(),
|
.collect(),
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
self.derivative_cache = None;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
self.back_cache = None;
|
self.back_cache = None;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user