aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/basicstuff.cpp
Commit message (Collapse)AuthorAge
* Explicit casts of S -> std::complex<T>Gravatar Antonio Sanchez2020-11-14
| | | | | | | | | | | | | | | | When calling `internal::cast<S, std::complex<T>>(x)`, clang often generates an implicit conversion warning due to an implicit cast from type `S` to `T`. This currently affects the following tests: - `basicstuff` - `bfloat16_float` - `cxx11_tensor_casts` The implicit cast leads to widening/narrowing float conversions. Widening warnings only seem to be generated by clang (`-Wdouble-promotion`). To eliminate the warning, we explicitly cast the real-component first from `S` to `T`. We also adjust tests to use `internal::cast` instead of `static_cast` when a complex type may be involved.
* Fix test basic stuffGravatar David Tellenbach2020-07-09
| | | | | | - Guard fundamental types that are not available pre C++11 - Separate subsequent angle brackets >> by spaces - Allow casting of Eigen::half and Eigen::bfloat16 to complex types
* Fix tensor casts for large packets and casts to/from std::complexGravatar Antonio Sanchez2020-06-30
| | | | | | | | | | | | | The original tensor casts were only defined for `SrcCoeffRatio`:`TgtCoeffRatio` 1:1, 1:2, 2:1, 4:1. Here we add the missing 1:N and 8:1. We also add casting `Eigen::half` to/from `std::complex<T>`, which was missing to make it consistent with `Eigen:bfloat16`, and generalize the overload to work for any complex type. Tests were added to `basicstuff`, `packetmath`, and `cxx11_tensor_casts` to test all cast configurations.
* Remove usage of #if EIGEN_TEST_PART_XX in unit tests that does not require ↵Gravatar Gael Guennebaud2018-07-17
| | | | them (splitting can thus be avoided for them)
* Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with ↵Gravatar Gael Guennebaud2018-07-17
| | | | | | | | | EIGEN_DECLARE_TEST(mytest) { /* code */ }. This provide several advantages: - more flexibility in designing unit tests - unit tests can be glued to speed up compilation - unit tests are compiled with same predefined macros, which is a requirement for zapcc
* Remove local Index typedef from unit-testsGravatar Gael Guennebaud2018-07-12
|
* Fix overflow and make use of long long in c++11 only.Gravatar Gael Guennebaud2017-02-13
|
* Fix vector indexing with uint64_tGravatar Jonathan Hseu2017-02-11
|
* Add unit tests for bug #981: valid and invalid usage of ternary operatorGravatar Gael Guennebaud2015-09-09
|
* Fix the fact that float(int) != float(int(float(int)))Gravatar Gael Guennebaud2015-06-23
|
* Ambiguous call fixes for clang.Gravatar Gael Guennebaud2014-07-22
|
* Extend fixed-size ctor unit test and fix conversion warning.Gravatar Gael Guennebaud2014-07-22
|
* Additional unit tests for bug #826 by GaelGravatar Christoph Hertzberg2014-06-23
|
* Fix bug #314: move remaining math functions from internal to numext namespaceGravatar Gael Guennebaud2013-06-10
|
* Update basicstuff unit test to avoid instantiating the ambiguous sqrt(int)Gravatar Gael Guennebaud2013-02-14
|
* Automatic relicensing to MPL2 using Keirs script. Manual fixup follows.Gravatar Benoit Jacob2012-07-13
|
* Fix some unused-variable warnings with GCC 4.6Gravatar Benoit Jacob2011-10-30
|
* add the possibility to configure the maximal matrix size in the unit testsGravatar Gael Guennebaud2011-07-12
|
* fix unit tests for integer types in preparation for next changeset making ↵Gravatar Benoit Jacob2011-02-07
| | | | random<int> span over a much bigger range
* Added unit test for matrix creation from const raw data.Gravatar Hauke Heibel2010-12-15
|
* bug #86 : use internal:: namespace instead of ei_ prefixGravatar Benoit Jacob2010-10-25
|
* noalias was wrongly skipping automatic transpositionGravatar Gael Guennebaud2010-09-02
|
* More Index related stuff.Gravatar Hauke Heibel2010-06-21
|
* Utilize Index in all unit tests.Gravatar Hauke Heibel2010-06-20
|
* Make test slightly fuzzy to account for effect of extended precision.Gravatar Jitse Niesen2010-06-10
|
* fix compilation error thanks to test case by Trevor Irons, and expand unit testGravatar Benoit Jacob2010-05-09
|
* introduce DenseCoeffsBase: this is where the coeff / coeffRef / etc... ↵Gravatar Benoit Jacob2010-05-08
| | | | | | methods go. Rationale: coeffRef() methods should only exist when we have DirectAccess. So a natural thing to do would have been to use enable_if, but since there are many methods it made more sense to do the "enable_if" for the whole group by introducing a new class. And that also that the benefit of not changing method prototypes.
* Complete rework of global math functions and NumTraits.Gravatar Benoit Jacob2010-04-28
| | | | | | | | * Now completely generic so all standard integer types (like char...) are supported. ** add unit test for that (integer_types). * NumTraits does no longer inherit numeric_limits * All math functions are now templated * Better guard (static asserts) against using certain math functions on integer types.
* restrict operator[] to vectors, not matrices.Gravatar Benoit Jacob2010-04-23
|
* * Refactoring of the class hierarchy: introduction of DenseDirectAccessBase, ↵Gravatar Benoit Jacob2010-04-16
| | | | | | | | | removal of extra _Base/_Options template parameters. * Introduction of strides-at-compile-time so for example the optimized code really knows when it needs to evaluate to a temporary * StorageKind / XprKind * Quaternion::setFromTwoVectors: use JacobiSVD instead of SVD * ComplexSchur: support the 1x1 case
* unit tests for == / != operatorsGravatar Thomas Capricelli2010-01-17
|
* big huge changes, so i dont remember everything.Gravatar Benoit Jacob2009-10-28
| | | | | | | | | | * renaming, e.g. LU ---> FullPivLU * split tests framework: more robust, e.g. dont generate empty tests if a number is skipped * make all remaining tests use that splitting, as needed. * Fix 4x4 inversion (see stable branch) * Transform::inverse() and geo_transform test : adapt to new inverse() API, it was also trying to instantiate inverse() for 3x4 matrices. * CMakeLists: more robust regexp to parse the version number * misc fixes in unit tests
* * add serious unit test for swapGravatar Benoit Jacob2009-09-02
| | | | * fix my stupidity in Matrix::swap()
* Set of fixes and workaround to make sun studio more happy.Gravatar Gael Guennebaud2009-07-10
| | | | Still remains the problem of alignment and vectorization.
* mergeGravatar Benoit Jacob2009-05-22
|\
| * remove sentence "Eigen itself is part of the KDE project."Gravatar Benoit Jacob2009-05-22
| | | | | | | | it never made very precise sense. but now does it still make any?
* | * add a writable generic coeff wise expression (CwiseUnaryView)Gravatar Gael Guennebaud2009-05-20
|/ | | | * add writable .real() and .imag() functions
* gni, forgot to call the new subtestGravatar Benoit Jacob2009-04-29
|
* add cast<>() tests. including a vectorization_logic test that currently ↵Gravatar Benoit Jacob2009-04-29
| | | | fails (casting to same type should not prevent vectorization)
* now these tests succeed with 10,000 repeatsGravatar Benoit Jacob2009-01-27
|
* * remove set(), revert to old behavior where = resizesGravatar Benoit Jacob2009-01-21
| | | | | | | | | | * try to be clever in matrix ctors and operator=: be lazy when we can, always allow to copy rowvector into columnvector, check the template parameters, try to factor the code better * add missing copy ctor in UnalignedType * fix bug in the traits of DiagonalProduct * renaming: EIGEN_TUNE_FOR_CPU_CACHE_SIZE * update the dox a little
* Update e-mail addressGravatar Benoit Jacob2008-11-24
|
* As discussed on ML:Gravatar Gael Guennebaud2008-10-24
| | | | | | | | | | * remove the automatic resizing feature of operator = * add function Matrix::set() to be used when the previous behavior is wanted * the default constructor of dynamic-size matrices now creates a "null" matrix (data=0, rows = cols = 0) instead of a 1x1 matrix * fix UnixX typos ;)
* * fix issues with "long double" type (useful to enforce the use of x87 ↵Gravatar Gael Guennebaud2008-09-14
| | | | | | registers) * extend the documentation on "extending Eigen"
* if EIGEN_NICE_RANDOM is defined, the random functions will return numbers withGravatar Benoit Jacob2008-09-01
| | | | | | few bits left of the comma and for floating-point types will never return zero. This replaces the custom functions in test/main.h, so one does not anymore need to think about that when writing tests.
* * bugfix in SolveTriangular found by Timothy Hunter (did not compiled for ↵Gravatar Gael Guennebaud2008-08-22
| | | | | | | | very small fixed size matrices) * bugfix in Dot unroller * added special random generator for the unit tests and reduced the tolerance threshold by an order of magnitude this fixes issues with sum.cpp but other tests still failed sometimes, this have to be carefully checked...
* *add operator()(int) for vectors, synonymous to operator[](int).Gravatar Benoit Jacob2008-08-18
| | | | | | I don't see any reason not to allow it, it doesn't add much code, and it makes porting from eigen1 easier. *expand tests/basicstuff to first test coefficient access methods
* * Merge Extract and Part to the Part expression.Gravatar Gael Guennebaud2008-07-21
| | | | | | Renamed "MatrixBase::extract() const" to "MatrixBase::part() const" * Renamed static functions identity, zero, ones, random with an upper case first letter: Identity, Zero, Ones and Random.
* * fix compilation issue in ProductGravatar Gael Guennebaud2008-07-02
| | | | | * added some tests for product and swap * overload .swap() for dynamic-sized matrix of same size
* update of the testing framework:Gravatar Gael Guennebaud2008-05-22
| | | | | replaced the QTestLib framework my custom macros and a (optional) custom script to run the tests from ctest.