mixingtypes.cpp
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-2015 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #if defined(EIGEN_TEST_PART_7)
12 
13 #ifndef EIGEN_NO_STATIC_ASSERT
14 #define EIGEN_NO_STATIC_ASSERT // turn static asserts into runtime asserts in order to check them
15 #endif
16 
17 // ignore double-promotion diagnostic for clang and gcc, if we check for static assertion anyway:
18 // TODO do the same for MSVC?
19 #if defined(__clang__)
20 # if (__clang_major__ * 100 + __clang_minor__) >= 308
21 # pragma clang diagnostic ignored "-Wdouble-promotion"
22 # endif
23 #elif defined(__GNUC__)
24  // TODO is there a minimal GCC version for this? At least g++-4.7 seems to be fine with this.
25 # pragma GCC diagnostic ignored "-Wdouble-promotion"
26 #endif
27 
28 #endif
29 
30 
31 
32 #if defined(EIGEN_TEST_PART_1) || defined(EIGEN_TEST_PART_2) || defined(EIGEN_TEST_PART_3)
33 
34 #ifndef EIGEN_DONT_VECTORIZE
35 #define EIGEN_DONT_VECTORIZE
36 #endif
37 
38 #endif
39 
40 static bool g_called;
41 #define EIGEN_SCALAR_BINARY_OP_PLUGIN { g_called |= (!internal::is_same<LhsScalar,RhsScalar>::value); }
42 
43 #include "main.h"
44 
45 using namespace std;
46 
47 #define VERIFY_MIX_SCALAR(XPR,REF) \
48  g_called = false; \
49  VERIFY_IS_APPROX(XPR,REF); \
50  VERIFY( g_called && #XPR" not properly optimized");
51 
52 template<int SizeAtCompileType>
53 void raise_assertion(Index size = SizeAtCompileType)
54 {
55  // VERIFY_RAISES_ASSERT(mf+md); // does not even compile
58  VERIFY_RAISES_ASSERT(vf=vd);
59  VERIFY_RAISES_ASSERT(vf+=vd);
60  VERIFY_RAISES_ASSERT(vf-=vd);
61  VERIFY_RAISES_ASSERT(vd=vf);
62  VERIFY_RAISES_ASSERT(vd+=vf);
63  VERIFY_RAISES_ASSERT(vd-=vf);
64 
65  // vd.asDiagonal() * mf; // does not even compile
66  // vcd.asDiagonal() * mf; // does not even compile
67 
68 #if 0 // we get other compilation errors here than just static asserts
69  VERIFY_RAISES_ASSERT(vd.dot(vf));
70 #endif
71 }
72 
73 
74 template<int SizeAtCompileType> void mixingtypes(int size = SizeAtCompileType)
75 {
76  typedef std::complex<float> CF;
77  typedef std::complex<double> CD;
80  typedef Matrix<std::complex<float>, SizeAtCompileType, SizeAtCompileType> Mat_cf;
81  typedef Matrix<std::complex<double>, SizeAtCompileType, SizeAtCompileType> Mat_cd;
84  typedef Matrix<std::complex<float>, SizeAtCompileType, 1> Vec_cf;
85  typedef Matrix<std::complex<double>, SizeAtCompileType, 1> Vec_cd;
86 
87  Mat_f mf = Mat_f::Random(size,size);
88  Mat_d md = mf.template cast<double>();
89  //Mat_d rd = md;
90  Mat_cf mcf = Mat_cf::Random(size,size);
91  Mat_cd mcd = mcf.template cast<complex<double> >();
92  Mat_cd rcd = mcd;
93  Vec_f vf = Vec_f::Random(size,1);
94  Vec_d vd = vf.template cast<double>();
95  Vec_cf vcf = Vec_cf::Random(size,1);
96  Vec_cd vcd = vcf.template cast<complex<double> >();
97  float sf = internal::random<float>();
98  double sd = internal::random<double>();
99  complex<float> scf = internal::random<complex<float> >();
100  complex<double> scd = internal::random<complex<double> >();
101 
102  mf+mf;
103 
106 
107  while(std::abs(sf )<epsf) sf = internal::random<float>();
108  while(std::abs(sd )<epsd) sd = internal::random<double>();
109  while(std::abs(scf)<epsf) scf = internal::random<CF>();
110  while(std::abs(scd)<epsd) scd = internal::random<CD>();
111 
112  // check scalar products
113  VERIFY_MIX_SCALAR(vcf * sf , vcf * complex<float>(sf));
114  VERIFY_MIX_SCALAR(sd * vcd , complex<double>(sd) * vcd);
115  VERIFY_MIX_SCALAR(vf * scf , vf.template cast<complex<float> >() * scf);
116  VERIFY_MIX_SCALAR(scd * vd , scd * vd.template cast<complex<double> >());
117 
118  VERIFY_MIX_SCALAR(vcf * 2 , vcf * complex<float>(2));
119  VERIFY_MIX_SCALAR(vcf * 2.1 , vcf * complex<float>(2.1));
120  VERIFY_MIX_SCALAR(2 * vcf, vcf * complex<float>(2));
121  VERIFY_MIX_SCALAR(2.1 * vcf , vcf * complex<float>(2.1));
122 
123  // check scalar quotients
124  VERIFY_MIX_SCALAR(vcf / sf , vcf / complex<float>(sf));
125  VERIFY_MIX_SCALAR(vf / scf , vf.template cast<complex<float> >() / scf);
126  VERIFY_MIX_SCALAR(vf.array() / scf, vf.template cast<complex<float> >().array() / scf);
127  VERIFY_MIX_SCALAR(scd / vd.array() , scd / vd.template cast<complex<double> >().array());
128 
129  // check scalar increment
130  VERIFY_MIX_SCALAR(vcf.array() + sf , vcf.array() + complex<float>(sf));
131  VERIFY_MIX_SCALAR(sd + vcd.array(), complex<double>(sd) + vcd.array());
132  VERIFY_MIX_SCALAR(vf.array() + scf, vf.template cast<complex<float> >().array() + scf);
133  VERIFY_MIX_SCALAR(scd + vd.array() , scd + vd.template cast<complex<double> >().array());
134 
135  // check scalar subtractions
136  VERIFY_MIX_SCALAR(vcf.array() - sf , vcf.array() - complex<float>(sf));
137  VERIFY_MIX_SCALAR(sd - vcd.array(), complex<double>(sd) - vcd.array());
138  VERIFY_MIX_SCALAR(vf.array() - scf, vf.template cast<complex<float> >().array() - scf);
139  VERIFY_MIX_SCALAR(scd - vd.array() , scd - vd.template cast<complex<double> >().array());
140 
141  // check scalar powers
142  VERIFY_MIX_SCALAR( pow(vcf.array(), sf), Eigen::pow(vcf.array(), complex<float>(sf)) );
143  VERIFY_MIX_SCALAR( vcf.array().pow(sf) , Eigen::pow(vcf.array(), complex<float>(sf)) );
144  VERIFY_MIX_SCALAR( pow(sd, vcd.array()), Eigen::pow(complex<double>(sd), vcd.array()) );
145  VERIFY_MIX_SCALAR( Eigen::pow(vf.array(), scf), Eigen::pow(vf.template cast<complex<float> >().array(), scf) );
146  VERIFY_MIX_SCALAR( vf.array().pow(scf) , Eigen::pow(vf.template cast<complex<float> >().array(), scf) );
147  VERIFY_MIX_SCALAR( Eigen::pow(scd, vd.array()), Eigen::pow(scd, vd.template cast<complex<double> >().array()) );
148 
149  // check dot product
150  vf.dot(vf);
151  VERIFY_IS_APPROX(vcf.dot(vf), vcf.dot(vf.template cast<complex<float> >()));
152 
153  // check diagonal product
154  VERIFY_IS_APPROX(vf.asDiagonal() * mcf, vf.template cast<complex<float> >().asDiagonal() * mcf);
155  VERIFY_IS_APPROX(vcd.asDiagonal() * md, vcd.asDiagonal() * md.template cast<complex<double> >());
156  VERIFY_IS_APPROX(mcf * vf.asDiagonal(), mcf * vf.template cast<complex<float> >().asDiagonal());
157  VERIFY_IS_APPROX(md * vcd.asDiagonal(), md.template cast<complex<double> >() * vcd.asDiagonal());
158 
159  // check inner product
160  VERIFY_IS_APPROX((vf.transpose() * vcf).value(), (vf.template cast<complex<float> >().transpose() * vcf).value());
161 
162  // check outer product
163  VERIFY_IS_APPROX((vf * vcf.transpose()).eval(), (vf.template cast<complex<float> >() * vcf.transpose()).eval());
164 
165  // coeff wise product
166 
167  VERIFY_IS_APPROX((vf * vcf.transpose()).eval(), (vf.template cast<complex<float> >() * vcf.transpose()).eval());
168 
169  Mat_cd mcd2 = mcd;
170  VERIFY_IS_APPROX(mcd.array() *= md.array(), mcd2.array() *= md.array().template cast<std::complex<double> >());
171 
172  // check matrix-matrix products
173  VERIFY_IS_APPROX(sd*md*mcd, (sd*md).template cast<CD>().eval()*mcd);
174  VERIFY_IS_APPROX(sd*mcd*md, sd*mcd*md.template cast<CD>());
175  VERIFY_IS_APPROX(scd*md*mcd, scd*md.template cast<CD>().eval()*mcd);
176  VERIFY_IS_APPROX(scd*mcd*md, scd*mcd*md.template cast<CD>());
177 
178  VERIFY_IS_APPROX(sf*mf*mcf, sf*mf.template cast<CF>()*mcf);
179  VERIFY_IS_APPROX(sf*mcf*mf, sf*mcf*mf.template cast<CF>());
180  VERIFY_IS_APPROX(scf*mf*mcf, scf*mf.template cast<CF>()*mcf);
181  VERIFY_IS_APPROX(scf*mcf*mf, scf*mcf*mf.template cast<CF>());
182 
183  VERIFY_IS_APPROX(sd*md.adjoint()*mcd, (sd*md).template cast<CD>().eval().adjoint()*mcd);
184  VERIFY_IS_APPROX(sd*mcd.adjoint()*md, sd*mcd.adjoint()*md.template cast<CD>());
185  VERIFY_IS_APPROX(sd*md.adjoint()*mcd.adjoint(), (sd*md).template cast<CD>().eval().adjoint()*mcd.adjoint());
186  VERIFY_IS_APPROX(sd*mcd.adjoint()*md.adjoint(), sd*mcd.adjoint()*md.template cast<CD>().adjoint());
187  VERIFY_IS_APPROX(sd*md*mcd.adjoint(), (sd*md).template cast<CD>().eval()*mcd.adjoint());
188  VERIFY_IS_APPROX(sd*mcd*md.adjoint(), sd*mcd*md.template cast<CD>().adjoint());
189 
190  VERIFY_IS_APPROX(sf*mf.adjoint()*mcf, (sf*mf).template cast<CF>().eval().adjoint()*mcf);
191  VERIFY_IS_APPROX(sf*mcf.adjoint()*mf, sf*mcf.adjoint()*mf.template cast<CF>());
192  VERIFY_IS_APPROX(sf*mf.adjoint()*mcf.adjoint(), (sf*mf).template cast<CF>().eval().adjoint()*mcf.adjoint());
193  VERIFY_IS_APPROX(sf*mcf.adjoint()*mf.adjoint(), sf*mcf.adjoint()*mf.template cast<CF>().adjoint());
194  VERIFY_IS_APPROX(sf*mf*mcf.adjoint(), (sf*mf).template cast<CF>().eval()*mcf.adjoint());
195  VERIFY_IS_APPROX(sf*mcf*mf.adjoint(), sf*mcf*mf.template cast<CF>().adjoint());
196 
197  VERIFY_IS_APPROX(sf*mf*vcf, (sf*mf).template cast<CF>().eval()*vcf);
198  VERIFY_IS_APPROX(scf*mf*vcf,(scf*mf.template cast<CF>()).eval()*vcf);
199  VERIFY_IS_APPROX(sf*mcf*vf, sf*mcf*vf.template cast<CF>());
200  VERIFY_IS_APPROX(scf*mcf*vf,scf*mcf*vf.template cast<CF>());
201 
202  VERIFY_IS_APPROX(sf*vcf.adjoint()*mf, sf*vcf.adjoint()*mf.template cast<CF>().eval());
203  VERIFY_IS_APPROX(scf*vcf.adjoint()*mf, scf*vcf.adjoint()*mf.template cast<CF>().eval());
204  VERIFY_IS_APPROX(sf*vf.adjoint()*mcf, sf*vf.adjoint().template cast<CF>().eval()*mcf);
205  VERIFY_IS_APPROX(scf*vf.adjoint()*mcf, scf*vf.adjoint().template cast<CF>().eval()*mcf);
206 
207  VERIFY_IS_APPROX(sd*md*vcd, (sd*md).template cast<CD>().eval()*vcd);
208  VERIFY_IS_APPROX(scd*md*vcd,(scd*md.template cast<CD>()).eval()*vcd);
209  VERIFY_IS_APPROX(sd*mcd*vd, sd*mcd*vd.template cast<CD>().eval());
210  VERIFY_IS_APPROX(scd*mcd*vd,scd*mcd*vd.template cast<CD>().eval());
211 
212  VERIFY_IS_APPROX(sd*vcd.adjoint()*md, sd*vcd.adjoint()*md.template cast<CD>().eval());
213  VERIFY_IS_APPROX(scd*vcd.adjoint()*md, scd*vcd.adjoint()*md.template cast<CD>().eval());
214  VERIFY_IS_APPROX(sd*vd.adjoint()*mcd, sd*vd.adjoint().template cast<CD>().eval()*mcd);
215  VERIFY_IS_APPROX(scd*vd.adjoint()*mcd, scd*vd.adjoint().template cast<CD>().eval()*mcd);
216 
217  VERIFY_IS_APPROX( sd*vcd.adjoint()*md.template triangularView<Upper>(), sd*vcd.adjoint()*md.template cast<CD>().eval().template triangularView<Upper>());
218  VERIFY_IS_APPROX(scd*vcd.adjoint()*md.template triangularView<Lower>(), scd*vcd.adjoint()*md.template cast<CD>().eval().template triangularView<Lower>());
219  VERIFY_IS_APPROX( sd*vcd.adjoint()*md.transpose().template triangularView<Upper>(), sd*vcd.adjoint()*md.transpose().template cast<CD>().eval().template triangularView<Upper>());
220  VERIFY_IS_APPROX(scd*vcd.adjoint()*md.transpose().template triangularView<Lower>(), scd*vcd.adjoint()*md.transpose().template cast<CD>().eval().template triangularView<Lower>());
221  VERIFY_IS_APPROX( sd*vd.adjoint()*mcd.template triangularView<Lower>(), sd*vd.adjoint().template cast<CD>().eval()*mcd.template triangularView<Lower>());
222  VERIFY_IS_APPROX(scd*vd.adjoint()*mcd.template triangularView<Upper>(), scd*vd.adjoint().template cast<CD>().eval()*mcd.template triangularView<Upper>());
223  VERIFY_IS_APPROX( sd*vd.adjoint()*mcd.transpose().template triangularView<Lower>(), sd*vd.adjoint().template cast<CD>().eval()*mcd.transpose().template triangularView<Lower>());
224  VERIFY_IS_APPROX(scd*vd.adjoint()*mcd.transpose().template triangularView<Upper>(), scd*vd.adjoint().template cast<CD>().eval()*mcd.transpose().template triangularView<Upper>());
225 
226  // Not supported yet: trmm
227 // VERIFY_IS_APPROX(sd*mcd*md.template triangularView<Lower>(), sd*mcd*md.template cast<CD>().eval().template triangularView<Lower>());
228 // VERIFY_IS_APPROX(scd*mcd*md.template triangularView<Upper>(), scd*mcd*md.template cast<CD>().eval().template triangularView<Upper>());
229 // VERIFY_IS_APPROX(sd*md*mcd.template triangularView<Lower>(), sd*md.template cast<CD>().eval()*mcd.template triangularView<Lower>());
230 // VERIFY_IS_APPROX(scd*md*mcd.template triangularView<Upper>(), scd*md.template cast<CD>().eval()*mcd.template triangularView<Upper>());
231 
232  // Not supported yet: symv
233 // VERIFY_IS_APPROX(sd*vcd.adjoint()*md.template selfadjointView<Upper>(), sd*vcd.adjoint()*md.template cast<CD>().eval().template selfadjointView<Upper>());
234 // VERIFY_IS_APPROX(scd*vcd.adjoint()*md.template selfadjointView<Lower>(), scd*vcd.adjoint()*md.template cast<CD>().eval().template selfadjointView<Lower>());
235 // VERIFY_IS_APPROX(sd*vd.adjoint()*mcd.template selfadjointView<Lower>(), sd*vd.adjoint().template cast<CD>().eval()*mcd.template selfadjointView<Lower>());
236 // VERIFY_IS_APPROX(scd*vd.adjoint()*mcd.template selfadjointView<Upper>(), scd*vd.adjoint().template cast<CD>().eval()*mcd.template selfadjointView<Upper>());
237 
238  // Not supported yet: symm
239 // VERIFY_IS_APPROX(sd*vcd.adjoint()*md.template selfadjointView<Upper>(), sd*vcd.adjoint()*md.template cast<CD>().eval().template selfadjointView<Upper>());
240 // VERIFY_IS_APPROX(scd*vcd.adjoint()*md.template selfadjointView<Upper>(), scd*vcd.adjoint()*md.template cast<CD>().eval().template selfadjointView<Upper>());
241 // VERIFY_IS_APPROX(sd*vd.adjoint()*mcd.template selfadjointView<Upper>(), sd*vd.adjoint().template cast<CD>().eval()*mcd.template selfadjointView<Upper>());
242 // VERIFY_IS_APPROX(scd*vd.adjoint()*mcd.template selfadjointView<Upper>(), scd*vd.adjoint().template cast<CD>().eval()*mcd.template selfadjointView<Upper>());
243 
244  rcd.setZero();
245  VERIFY_IS_APPROX(Mat_cd(rcd.template triangularView<Upper>() = sd * mcd * md),
246  Mat_cd((sd * mcd * md.template cast<CD>().eval()).template triangularView<Upper>()));
247  VERIFY_IS_APPROX(Mat_cd(rcd.template triangularView<Upper>() = sd * md * mcd),
248  Mat_cd((sd * md.template cast<CD>().eval() * mcd).template triangularView<Upper>()));
249  VERIFY_IS_APPROX(Mat_cd(rcd.template triangularView<Upper>() = scd * mcd * md),
250  Mat_cd((scd * mcd * md.template cast<CD>().eval()).template triangularView<Upper>()));
251  VERIFY_IS_APPROX(Mat_cd(rcd.template triangularView<Upper>() = scd * md * mcd),
252  Mat_cd((scd * md.template cast<CD>().eval() * mcd).template triangularView<Upper>()));
253 
254 
255  VERIFY_IS_APPROX( md.array() * mcd.array(), md.template cast<CD>().eval().array() * mcd.array() );
256  VERIFY_IS_APPROX( mcd.array() * md.array(), mcd.array() * md.template cast<CD>().eval().array() );
257 
258  VERIFY_IS_APPROX( md.array() + mcd.array(), md.template cast<CD>().eval().array() + mcd.array() );
259  VERIFY_IS_APPROX( mcd.array() + md.array(), mcd.array() + md.template cast<CD>().eval().array() );
260 
261  VERIFY_IS_APPROX( md.array() - mcd.array(), md.template cast<CD>().eval().array() - mcd.array() );
262  VERIFY_IS_APPROX( mcd.array() - md.array(), mcd.array() - md.template cast<CD>().eval().array() );
263 
264  if(mcd.array().abs().minCoeff()>epsd)
265  {
266  VERIFY_IS_APPROX( md.array() / mcd.array(), md.template cast<CD>().eval().array() / mcd.array() );
267  }
268  if(md.array().abs().minCoeff()>epsd)
269  {
270  VERIFY_IS_APPROX( mcd.array() / md.array(), mcd.array() / md.template cast<CD>().eval().array() );
271  }
272 
273  if(md.array().abs().minCoeff()>epsd || mcd.array().abs().minCoeff()>epsd)
274  {
275  VERIFY_IS_APPROX( md.array().pow(mcd.array()), md.template cast<CD>().eval().array().pow(mcd.array()) );
276  VERIFY_IS_APPROX( mcd.array().pow(md.array()), mcd.array().pow(md.template cast<CD>().eval().array()) );
277 
278  VERIFY_IS_APPROX( pow(md.array(),mcd.array()), md.template cast<CD>().eval().array().pow(mcd.array()) );
279  VERIFY_IS_APPROX( pow(mcd.array(),md.array()), mcd.array().pow(md.template cast<CD>().eval().array()) );
280  }
281 
282  rcd = mcd;
283  VERIFY_IS_APPROX( rcd = md, md.template cast<CD>().eval() );
284  rcd = mcd;
285  VERIFY_IS_APPROX( rcd += md, mcd + md.template cast<CD>().eval() );
286  rcd = mcd;
287  VERIFY_IS_APPROX( rcd -= md, mcd - md.template cast<CD>().eval() );
288  rcd = mcd;
289  VERIFY_IS_APPROX( rcd.array() *= md.array(), mcd.array() * md.template cast<CD>().eval().array() );
290  rcd = mcd;
291  if(md.array().abs().minCoeff()>epsd)
292  {
293  VERIFY_IS_APPROX( rcd.array() /= md.array(), mcd.array() / md.template cast<CD>().eval().array() );
294  }
295 
296  rcd = mcd;
297  VERIFY_IS_APPROX( rcd.noalias() += md + mcd*md, mcd + (md.template cast<CD>().eval()) + mcd*(md.template cast<CD>().eval()));
298 
299  VERIFY_IS_APPROX( rcd.noalias() = md*md, ((md*md).eval().template cast<CD>()) );
300  rcd = mcd;
301  VERIFY_IS_APPROX( rcd.noalias() += md*md, mcd + ((md*md).eval().template cast<CD>()) );
302  rcd = mcd;
303  VERIFY_IS_APPROX( rcd.noalias() -= md*md, mcd - ((md*md).eval().template cast<CD>()) );
304 
305  VERIFY_IS_APPROX( rcd.noalias() = mcd + md*md, mcd + ((md*md).eval().template cast<CD>()) );
306  rcd = mcd;
307  VERIFY_IS_APPROX( rcd.noalias() += mcd + md*md, mcd + mcd + ((md*md).eval().template cast<CD>()) );
308  rcd = mcd;
309  VERIFY_IS_APPROX( rcd.noalias() -= mcd + md*md, - ((md*md).eval().template cast<CD>()) );
310 }
311 
313 {
314  for(int i = 0; i < g_repeat; i++) {
315  CALL_SUBTEST_1(mixingtypes<3>());
316  CALL_SUBTEST_2(mixingtypes<4>());
317  CALL_SUBTEST_3(mixingtypes<Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)));
318 
319  CALL_SUBTEST_4(mixingtypes<3>());
320  CALL_SUBTEST_5(mixingtypes<4>());
321  CALL_SUBTEST_6(mixingtypes<Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)));
322  CALL_SUBTEST_7(raise_assertion<Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)));
323  }
324  CALL_SUBTEST_7(raise_assertion<0>());
325  CALL_SUBTEST_7(raise_assertion<3>());
326  CALL_SUBTEST_7(raise_assertion<4>());
327  CALL_SUBTEST_7(raise_assertion<Dynamic>(0));
328 }
int array[24]
#define VERIFY_RAISES_ASSERT(a)
Definition: main.h:285
void adjoint(const MatrixType &m)
Definition: adjoint.cpp:67
Matrix2d md
#define min(a, b)
Definition: datatypes.h:19
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Definition: Half.h:150
#define VERIFY_MIX_SCALAR(XPR, REF)
Definition: mixingtypes.cpp:47
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
#define VERIFY_IS_APPROX(a, b)
static int g_repeat
Definition: main.h:144
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
EIGEN_DEVICE_FUNC NewType cast(const OldType &x)
#define EIGEN_TEST_MAX_SIZE
A triangularView< Lower >().adjoint().solveInPlace(B)
static bool g_called
Definition: mixingtypes.cpp:40
#define EIGEN_EMPTY
Definition: Macros.h:815
internal::nested_eval< T, 1 >::type eval(const T &xpr)
Jet< T, N > pow(const Jet< T, N > &f, double g)
Definition: jet.h:570
The matrix class, also used for vectors and row-vectors.
#define abs(x)
Definition: datatypes.h:17
Matrix2f mf
Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setRandom(Index size)
void test_mixingtypes()
void raise_assertion(Index size=SizeAtCompileType)
Definition: mixingtypes.cpp:53
void mixingtypes(int size=SizeAtCompileType)
Definition: mixingtypes.cpp:74


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:43:01