[WIP] Add applyEntrywise method
1 unresolved thread
1 unresolved thread
With this tool, one can write quite general code to apply x = op(y)
entrywise for vectors x
, y
(where y
can indeed be a pack of vectors).
Edited by lh1887
Merge request reports
Activity
added 2 commits
44 45 Impl::ScalarSwitch<Vector>::truncate(v, tr); 45 46 } 46 47 48 /**! For a given operator "op", compute x = op(x,y) ENTRYWISE. 49 * 50 * If the op is not defined for the given types, 51 * the operator is recursively applied to subblocks 52 * until it can be used. 53 */ 54 template<typename X, typename Y, typename BinaryOp> 55 void inplaceBinary(X&& x, Y&& y, BinaryOp&& op) { 56 if constexpr(Concept::isLegalBinaryOperator(x,y,op)) {
Please register or sign in to reply