WPILibC++ 2023.4.3-108-ge5452e3
BinaryFunctors.h
Go to the documentation of this file.
1// This file is part of Eigen, a lightweight C++ template library
2// for linear algebra.
3//
4// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
5//
6// This Source Code Form is subject to the terms of the Mozilla
7// Public License v. 2.0. If a copy of the MPL was not distributed
8// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
10#ifndef EIGEN_BINARY_FUNCTORS_H
11#define EIGEN_BINARY_FUNCTORS_H
12
13namespace Eigen {
14
15namespace internal {
16
17//---------- associative binary functors ----------
18
19template<typename Arg1, typename Arg2>
21{
22 typedef Arg1 first_argument_type;
24};
25
26/** \internal
27 * \brief Template functor to compute the sum of two scalars
28 *
29 * \sa class CwiseBinaryOp, MatrixBase::operator+, class VectorwiseOp, DenseBase::sum()
30 */
31template<typename LhsScalar,typename RhsScalar>
32struct scalar_sum_op : binary_op_base<LhsScalar,RhsScalar>
33{
35#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN
37#else
39 EIGEN_SCALAR_BINARY_OP_PLUGIN
40 }
41#endif
42 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a + b; }
43 template<typename Packet>
44 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a, const Packet& b) const
45 { return internal::padd(a,b); }
46 template<typename Packet>
48 { return internal::predux(a); }
49};
50template<typename LhsScalar,typename RhsScalar>
51struct functor_traits<scalar_sum_op<LhsScalar,RhsScalar> > {
52 enum {
55 // TODO vectorize mixed sum
56 };
57};
58
59
60template<>
61EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool scalar_sum_op<bool,bool>::operator() (const bool& a, const bool& b) const { return a || b; }
62
63
64/** \internal
65 * \brief Template functor to compute the product of two scalars
66 *
67 * \sa class CwiseBinaryOp, Cwise::operator*(), class VectorwiseOp, MatrixBase::redux()
68 */
69template<typename LhsScalar,typename RhsScalar>
70struct scalar_product_op : binary_op_base<LhsScalar,RhsScalar>
71{
73#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN
75#else
77 EIGEN_SCALAR_BINARY_OP_PLUGIN
78 }
79#endif
80 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a * b; }
81 template<typename Packet>
82 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a, const Packet& b) const
83 { return internal::pmul(a,b); }
84 template<typename Packet>
86 { return internal::predux_mul(a); }
87};
88template<typename LhsScalar,typename RhsScalar>
89struct functor_traits<scalar_product_op<LhsScalar,RhsScalar> > {
90 enum {
93 // TODO vectorize mixed product
94 };
95};
96
97template<>
98EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool scalar_product_op<bool,bool>::operator() (const bool& a, const bool& b) const { return a && b; }
99
100
101/** \internal
102 * \brief Template functor to compute the conjugate product of two scalars
103 *
104 * This is a short cut for conj(x) * y which is needed for optimization purpose; in Eigen2 support mode, this becomes x * conj(y)
105 */
106template<typename LhsScalar,typename RhsScalar>
107struct scalar_conj_product_op : binary_op_base<LhsScalar,RhsScalar>
108{
109
110 enum {
112 };
113
115
117 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const
119
120 template<typename Packet>
121 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a, const Packet& b) const
123};
124template<typename LhsScalar,typename RhsScalar>
125struct functor_traits<scalar_conj_product_op<LhsScalar,RhsScalar> > {
126 enum {
129 };
130};
131
132/** \internal
133 * \brief Template functor to compute the min of two scalars
134 *
135 * \sa class CwiseBinaryOp, MatrixBase::cwiseMin, class VectorwiseOp, MatrixBase::minCoeff()
136 */
137template<typename LhsScalar,typename RhsScalar, int NaNPropagation>
138struct scalar_min_op : binary_op_base<LhsScalar,RhsScalar>
139{
142 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const {
143 return internal::pmin<NaNPropagation>(a, b);
144 }
145 template<typename Packet>
146 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a, const Packet& b) const
147 {
148 return internal::pmin<NaNPropagation>(a,b);
149 }
150 template<typename Packet>
152 {
153 return internal::predux_min<NaNPropagation>(a);
154 }
155};
156
157template<typename LhsScalar,typename RhsScalar, int NaNPropagation>
158struct functor_traits<scalar_min_op<LhsScalar,RhsScalar, NaNPropagation> > {
159 enum {
162 };
163};
164
165/** \internal
166 * \brief Template functor to compute the max of two scalars
167 *
168 * \sa class CwiseBinaryOp, MatrixBase::cwiseMax, class VectorwiseOp, MatrixBase::maxCoeff()
169 */
170template<typename LhsScalar,typename RhsScalar, int NaNPropagation>
171struct scalar_max_op : binary_op_base<LhsScalar,RhsScalar>
172{
175 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const LhsScalar& a, const RhsScalar& b) const {
176 return internal::pmax<NaNPropagation>(a,b);
177 }
178 template<typename Packet>
179 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a, const Packet& b) const
180 {
181 return internal::pmax<NaNPropagation>(a,b);
182 }
183 template<typename Packet>
185 {
186 return internal::predux_max<NaNPropagation>(a);
187 }
188};
189
190template<typename LhsScalar,typename RhsScalar, int NaNPropagation>
191struct functor_traits<scalar_max_op<LhsScalar,RhsScalar, NaNPropagation> > {
192 enum {
195 };
196};
197
198/** \internal
199 * \brief Template functors for comparison of two scalars
200 * \todo Implement packet-comparisons
201 */
202template<typename LhsScalar, typename RhsScalar, ComparisonName cmp> struct scalar_cmp_op;
203
204template<typename LhsScalar, typename RhsScalar, ComparisonName cmp>
205struct functor_traits<scalar_cmp_op<LhsScalar,RhsScalar, cmp> > {
206 enum {
208 PacketAccess = false
209 };
210};
211
212template<ComparisonName Cmp, typename LhsScalar, typename RhsScalar>
213struct result_of<scalar_cmp_op<LhsScalar, RhsScalar, Cmp>(LhsScalar,RhsScalar)> {
214 typedef bool type;
215};
216
217
218template<typename LhsScalar, typename RhsScalar>
219struct scalar_cmp_op<LhsScalar,RhsScalar, cmp_EQ> : binary_op_base<LhsScalar,RhsScalar>
220{
221 typedef bool result_type;
223 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a==b;}
224};
225template<typename LhsScalar, typename RhsScalar>
226struct scalar_cmp_op<LhsScalar,RhsScalar, cmp_LT> : binary_op_base<LhsScalar,RhsScalar>
227{
228 typedef bool result_type;
230 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a<b;}
231};
232template<typename LhsScalar, typename RhsScalar>
233struct scalar_cmp_op<LhsScalar,RhsScalar, cmp_LE> : binary_op_base<LhsScalar,RhsScalar>
234{
235 typedef bool result_type;
237 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a<=b;}
238};
239template<typename LhsScalar, typename RhsScalar>
240struct scalar_cmp_op<LhsScalar,RhsScalar, cmp_GT> : binary_op_base<LhsScalar,RhsScalar>
241{
242 typedef bool result_type;
244 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a>b;}
245};
246template<typename LhsScalar, typename RhsScalar>
247struct scalar_cmp_op<LhsScalar,RhsScalar, cmp_GE> : binary_op_base<LhsScalar,RhsScalar>
248{
249 typedef bool result_type;
251 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a>=b;}
252};
253template<typename LhsScalar, typename RhsScalar>
254struct scalar_cmp_op<LhsScalar,RhsScalar, cmp_UNORD> : binary_op_base<LhsScalar,RhsScalar>
255{
256 typedef bool result_type;
258 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return !(a<=b || b<=a);}
259};
260template<typename LhsScalar, typename RhsScalar>
261struct scalar_cmp_op<LhsScalar,RhsScalar, cmp_NEQ> : binary_op_base<LhsScalar,RhsScalar>
262{
263 typedef bool result_type;
265 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a!=b;}
266};
267
268/** \internal
269 * \brief Template functor to compute the hypot of two \b positive \b and \b real scalars
270 *
271 * \sa MatrixBase::stableNorm(), class Redux
272 */
273template<typename Scalar>
274struct scalar_hypot_op<Scalar,Scalar> : binary_op_base<Scalar,Scalar>
275{
277
278 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar &x, const Scalar &y) const
279 {
280 // This functor is used by hypotNorm only for which it is faster to first apply abs
281 // on all coefficients prior to reduction through hypot.
282 // This way we avoid calling abs on positive and real entries, and this also permits
283 // to seamlessly handle complexes. Otherwise we would have to handle both real and complexes
284 // through the same functor...
286 }
287};
288template<typename Scalar>
289struct functor_traits<scalar_hypot_op<Scalar,Scalar> > {
290 enum
291 {
295 PacketAccess = false
296 };
297};
298
299/** \internal
300 * \brief Template functor to compute the pow of two scalars
301 * See the specification of pow in https://en.cppreference.com/w/cpp/numeric/math/pow
302 */
303template<typename Scalar, typename Exponent>
304struct scalar_pow_op : binary_op_base<Scalar,Exponent>
305{
307#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN
309#else
310 scalar_pow_op() {
311 typedef Scalar LhsScalar;
312 typedef Exponent RhsScalar;
313 EIGEN_SCALAR_BINARY_OP_PLUGIN
314 }
315#endif
316
318 inline result_type operator() (const Scalar& a, const Exponent& b) const { return numext::pow(a, b); }
319
320 template<typename Packet>
321 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const
322 {
323 return generic_pow(a,b);
324 }
325};
326
327template<typename Scalar, typename Exponent>
328struct functor_traits<scalar_pow_op<Scalar,Exponent> > {
329 enum {
334 // Temporarly disable packet access for half/bfloat16 until
335 // accuracy is improved.
337 )
338 };
339};
340
341//---------- non associative binary functors ----------
342
343/** \internal
344 * \brief Template functor to compute the difference of two scalars
345 *
346 * \sa class CwiseBinaryOp, MatrixBase::operator-
347 */
348template<typename LhsScalar,typename RhsScalar>
349struct scalar_difference_op : binary_op_base<LhsScalar,RhsScalar>
350{
352#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN
354#else
356 EIGEN_SCALAR_BINARY_OP_PLUGIN
357 }
358#endif
359 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a - b; }
360 template<typename Packet>
361 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const
362 { return internal::psub(a,b); }
363};
364template<typename LhsScalar,typename RhsScalar>
365struct functor_traits<scalar_difference_op<LhsScalar,RhsScalar> > {
366 enum {
369 };
370};
371
372/** \internal
373 * \brief Template functor to compute the quotient of two scalars
374 *
375 * \sa class CwiseBinaryOp, Cwise::operator/()
376 */
377template<typename LhsScalar,typename RhsScalar>
378struct scalar_quotient_op : binary_op_base<LhsScalar,RhsScalar>
379{
381#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN
383#else
385 EIGEN_SCALAR_BINARY_OP_PLUGIN
386 }
387#endif
388 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a / b; }
389 template<typename Packet>
390 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const
391 { return internal::pdiv(a,b); }
392};
393template<typename LhsScalar,typename RhsScalar>
394struct functor_traits<scalar_quotient_op<LhsScalar,RhsScalar> > {
396 enum {
399 };
400};
401
402
403
404/** \internal
405 * \brief Template functor to compute the and of two booleans
406 *
407 * \sa class CwiseBinaryOp, ArrayBase::operator&&
408 */
411 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator() (const bool& a, const bool& b) const { return a && b; }
412 template<typename Packet>
413 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const
414 { return internal::pand(a,b); }
415};
417 enum {
419 PacketAccess = true
420 };
421};
422
423/** \internal
424 * \brief Template functor to compute the or of two booleans
425 *
426 * \sa class CwiseBinaryOp, ArrayBase::operator||
427 */
430 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator() (const bool& a, const bool& b) const { return a || b; }
431 template<typename Packet>
432 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const
433 { return internal::por(a,b); }
434};
436 enum {
438 PacketAccess = true
439 };
440};
441
442/** \internal
443 * \brief Template functor to compute the xor of two booleans
444 *
445 * \sa class CwiseBinaryOp, ArrayBase::operator^
446 */
449 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator() (const bool& a, const bool& b) const { return a ^ b; }
450 template<typename Packet>
451 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const
452 { return internal::pxor(a,b); }
453};
455 enum {
457 PacketAccess = true
458 };
459};
460
461/** \internal
462 * \brief Template functor to compute the absolute difference of two scalars
463 *
464 * \sa class CwiseBinaryOp, MatrixBase::absolute_difference
465 */
466template<typename LhsScalar,typename RhsScalar>
468{
470#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN
472#else
474 EIGEN_SCALAR_BINARY_OP_PLUGIN
475 }
476#endif
477 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const
478 { return numext::absdiff(a,b); }
479 template<typename Packet>
480 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const
481 { return internal::pabsdiff(a,b); }
482};
483template<typename LhsScalar,typename RhsScalar>
484struct functor_traits<scalar_absolute_difference_op<LhsScalar,RhsScalar> > {
485 enum {
488 };
489};
490
491
492
493//---------- binary functors bound to a constant, thus appearing as a unary functor ----------
494
495// The following two classes permits to turn any binary functor into a unary one with one argument bound to a constant value.
496// They are analogues to std::binder1st/binder2nd but with the following differences:
497// - they are compatible with packetOp
498// - they are portable across C++ versions (the std::binder* are deprecated in C++11)
499template<typename BinaryOp> struct bind1st_op : BinaryOp {
500
501 typedef typename BinaryOp::first_argument_type first_argument_type;
502 typedef typename BinaryOp::second_argument_type second_argument_type;
503 typedef typename BinaryOp::result_type result_type;
504
506
508
509 template<typename Packet>
510 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& b) const
511 { return BinaryOp::packetOp(internal::pset1<Packet>(m_value), b); }
512
514};
515template<typename BinaryOp> struct functor_traits<bind1st_op<BinaryOp> > : functor_traits<BinaryOp> {};
516
517
518template<typename BinaryOp> struct bind2nd_op : BinaryOp {
519
520 typedef typename BinaryOp::first_argument_type first_argument_type;
521 typedef typename BinaryOp::second_argument_type second_argument_type;
522 typedef typename BinaryOp::result_type result_type;
523
525
527
528 template<typename Packet>
529 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const
530 { return BinaryOp::packetOp(a,internal::pset1<Packet>(m_value)); }
531
533};
534template<typename BinaryOp> struct functor_traits<bind2nd_op<BinaryOp> > : functor_traits<BinaryOp> {};
535
536
537} // end namespace internal
538
539} // end namespace Eigen
540
541#endif // EIGEN_BINARY_FUNCTORS_H
internal::enable_if< internal::valid_indexed_view_overload< RowIndices, ColIndices >::value &&internal::traits< typenameEIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::ReturnAsIndexedView, typenameEIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::type operator()(const RowIndices &rowIndices, const ColIndices &colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST
Definition: IndexedViewMethods.h:73
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
#define EIGEN_STRONG_INLINE
Definition: Macros.h:927
#define EIGEN_EMPTY_STRUCT_CTOR(X)
Definition: XprHelper.h:22
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:215
@ cmp_NEQ
Definition: Constants.h:555
@ cmp_EQ
Definition: Constants.h:551
@ cmp_GT
Definition: Constants.h:556
@ cmp_LT
Definition: Constants.h:552
@ cmp_GE
Definition: Constants.h:557
@ cmp_LE
Definition: Constants.h:553
@ cmp_UNORD
Definition: Constants.h:554
EIGEN_DEVICE_FUNC unpacket_traits< Packet >::type predux(const Packet &a)
Definition: GenericPacketMath.h:875
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet generic_pow(const Packet &x, const Packet &y)
Definition: GenericPacketMathFunctions.h:1449
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE RealScalar positive_real_hypot(const RealScalar &x, const RealScalar &y)
Definition: MathFunctionsImpl.h:80
const Scalar & y
Definition: MathFunctions.h:821
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:244
EIGEN_STRONG_INLINE Packet8h por(const Packet8h &a, const Packet8h &b)
Definition: PacketMath.h:1042
EIGEN_DEVICE_FUNC unpacket_traits< Packet >::type predux_mul(const Packet &a)
Definition: GenericPacketMath.h:882
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:237
EIGEN_DEVICE_FUNC Packet pabsdiff(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:595
EIGEN_STRONG_INLINE Packet8h pand(const Packet8h &a, const Packet8h &b)
Definition: PacketMath.h:1050
EIGEN_STRONG_INLINE Packet8h pxor(const Packet8h &a, const Packet8h &b)
Definition: PacketMath.h:1047
EIGEN_DEVICE_FUNC Packet psub(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:222
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T absdiff(const T &x, const T &y)
Definition: MathFunctions.h:1296
EIGEN_DEVICE_FUNC internal::pow_impl< ScalarX, ScalarY >::result_type pow(const ScalarX &x, const ScalarY &y)
Definition: MathFunctions.h:1361
Namespace containing all symbols from the Eigen library.
Definition: Core:141
Definition: Eigen_Colamd.h:50
b
Definition: data.h:44
Holds information about the various numeric (i.e.
Definition: NumTraits.h:233
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
Definition: XprHelper.h:806
Definition: BinaryFunctors.h:21
Arg1 first_argument_type
Definition: BinaryFunctors.h:22
Arg2 second_argument_type
Definition: BinaryFunctors.h:23
Definition: BinaryFunctors.h:499
BinaryOp::second_argument_type second_argument_type
Definition: BinaryFunctors.h:502
EIGEN_DEVICE_FUNC bind1st_op(const first_argument_type &val)
Definition: BinaryFunctors.h:505
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &b) const
Definition: BinaryFunctors.h:510
first_argument_type m_value
Definition: BinaryFunctors.h:513
BinaryOp::first_argument_type first_argument_type
Definition: BinaryFunctors.h:501
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator()(const second_argument_type &b) const
Definition: BinaryFunctors.h:507
BinaryOp::result_type result_type
Definition: BinaryFunctors.h:503
Definition: BinaryFunctors.h:518
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a) const
Definition: BinaryFunctors.h:529
BinaryOp::first_argument_type first_argument_type
Definition: BinaryFunctors.h:520
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator()(const first_argument_type &a) const
Definition: BinaryFunctors.h:526
BinaryOp::second_argument_type second_argument_type
Definition: BinaryFunctors.h:521
second_argument_type m_value
Definition: BinaryFunctors.h:532
EIGEN_DEVICE_FUNC bind2nd_op(const second_argument_type &val)
Definition: BinaryFunctors.h:524
BinaryOp::result_type result_type
Definition: BinaryFunctors.h:522
Definition: ConjHelper.h:63
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ResultType pmul(const LhsType &x, const RhsType &y) const
Definition: ConjHelper.h:71
scalar_quotient_op< LhsScalar, RhsScalar >::result_type result_type
Definition: BinaryFunctors.h:395
Definition: XprHelper.h:176
@ PacketAccess
Definition: XprHelper.h:180
@ Cost
Definition: XprHelper.h:179
Definition: Meta.h:148
Definition: GenericPacketMath.h:107
Definition: Meta.h:513
Definition: BinaryFunctors.h:468
ScalarBinaryOpTraits< LhsScalar, RhsScalar, scalar_absolute_difference_op >::ReturnType result_type
Definition: BinaryFunctors.h:469
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator()(const LhsScalar &a, const RhsScalar &b) const
Definition: BinaryFunctors.h:477
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:480
Definition: BinaryFunctors.h:409
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:413
Definition: BinaryFunctors.h:428
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:432
Definition: BinaryFunctors.h:447
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:451
Definition: BinaryFunctors.h:202
Definition: BinaryFunctors.h:108
ScalarBinaryOpTraits< LhsScalar, RhsScalar, scalar_conj_product_op >::ReturnType result_type
Definition: BinaryFunctors.h:114
@ Conj
Definition: BinaryFunctors.h:111
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:121
Definition: BinaryFunctors.h:350
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:361
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator()(const LhsScalar &a, const RhsScalar &b) const
Definition: BinaryFunctors.h:359
ScalarBinaryOpTraits< LhsScalar, RhsScalar, scalar_difference_op >::ReturnType result_type
Definition: BinaryFunctors.h:351
Definition: XprHelper.h:710
Definition: ForwardDeclarations.h:210
Definition: BinaryFunctors.h:172
ScalarBinaryOpTraits< LhsScalar, RhsScalar, scalar_max_op >::ReturnType result_type
Definition: BinaryFunctors.h:173
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type predux(const Packet &a) const
Definition: BinaryFunctors.h:184
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:179
Definition: BinaryFunctors.h:139
ScalarBinaryOpTraits< LhsScalar, RhsScalar, scalar_min_op >::ReturnType result_type
Definition: BinaryFunctors.h:140
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type predux(const Packet &a) const
Definition: BinaryFunctors.h:151
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:146
Definition: BinaryFunctors.h:305
ScalarBinaryOpTraits< Scalar, Exponent, scalar_pow_op >::ReturnType result_type
Definition: BinaryFunctors.h:306
EIGEN_DEVICE_FUNC result_type operator()(const Scalar &a, const Exponent &b) const
Definition: BinaryFunctors.h:318
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:321
Definition: BinaryFunctors.h:71
ScalarBinaryOpTraits< LhsScalar, RhsScalar, scalar_product_op >::ReturnType result_type
Definition: BinaryFunctors.h:72
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator()(const LhsScalar &a, const RhsScalar &b) const
Definition: BinaryFunctors.h:80
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type predux(const Packet &a) const
Definition: BinaryFunctors.h:85
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:82
Definition: BinaryFunctors.h:379
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:390
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator()(const LhsScalar &a, const RhsScalar &b) const
Definition: BinaryFunctors.h:388
ScalarBinaryOpTraits< LhsScalar, RhsScalar, scalar_quotient_op >::ReturnType result_type
Definition: BinaryFunctors.h:380
Definition: BinaryFunctors.h:33
ScalarBinaryOpTraits< LhsScalar, RhsScalar, scalar_sum_op >::ReturnType result_type
Definition: BinaryFunctors.h:34
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type predux(const Packet &a) const
Definition: BinaryFunctors.h:47
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet &a, const Packet &b) const
Definition: BinaryFunctors.h:44
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator()(const LhsScalar &a, const RhsScalar &b) const
Definition: BinaryFunctors.h:42