-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Some functions (e.g. mix or even tan) can define their derivatives based on the derivatives of other existing ops. We don't want to fully define these using existing ops, though, because we still want our outputted GLSL to use more optimized functions where available (the tan op should use tan(x) instead of sin(x)/cos(x) for its definition even if the derivative is defined using other ops.) To accommodate this, we could have an internal derivative creator system:
class Tan extends Op {
derivative(param: Param) {
return createDerivative((d) => d.sin().div(d.cos())).gen(param)
}
// ...etc
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request