-
-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Labels
Description
Description
Now that Eigen's SIMD-vectorised elementwise functions have been introduced for containers of doubles
(in #1471 and #1727), they should also be added for containers of fvar<T>
and var
.
Example
A quick example for using exp
with fvar<T>
:
template <typename Container,
require_container_st<is_container, is_fvar, Container>...>
inline auto exp(const Container& x) {
return apply_vector_unary<Container>::apply(
x, [](const auto& v) {
auto exp_val = exp(v.val());
return to_fvar(exp_val,exp_val.cwiseProduct(v.d()));
});
}
Current Version:
v3.1.0
SteveBronder
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity