155 Commits

Author SHA1 Message Date
Gael Guennebaud
8efa5bb439 bug #921: fix utilization of bitwise operation on enums in first_aligned
(grafted from f5f6e2c6f46a8999ee36ce0c7adc62098d8d93d2
)
2014-12-19 14:41:59 +01:00
Christoph Hertzberg
238308e0f7 bug #909: Removed unreachable return statement 2014-11-26 15:45:11 +01:00
Christoph Hertzberg
e395a8042a Fix bug #884: No malloc for zero-sized matrices or for Ref without temporaries
manually ported from 4ba8aa14822ae0b444baa9e0d41d8744cdcd6b03
2014-09-25 16:25:31 +02:00
Gael Guennebaud
c880590d27 bug #861: enable posix_memalign with PGI
(grafted from 2e50289ba323740ef89eb51a74e00e645a8eb9be
)
2014-08-26 12:54:19 +02:00
Gael Guennebaud
c5c4269961 Fix bug #803: avoid char* to int* conversion
(grafted from 07986189b76001c0c29b1583592b00340b3343ba
)
2014-05-01 23:03:54 +02:00
Christoph Hertzberg
b0702dca05 Fixed bug #754. Only inserted (!defined(_WIN32_WCE)) analog to alloc and free implementation (not tested, but should be correct).
(transplanted from d5cc083782bc59049755696f2d22edfb0172d124
)
2014-03-05 14:50:00 +01:00
Gael Guennebaud
fd96ff166d alloca is not necessarily alligned on windows
(grafted from 97965dde9bc079d042d3c4037e1927bee0df443f
)
2014-02-14 00:04:38 +01:00
Gael Guennebaud
12504a79d1 Fix bug #708: add placement new/delete for array
(transplanted from 49034d15709bcad1f5fd3a36a8cd5aa362e7591e
)
2013-11-27 09:46:59 +01:00
Martinho Fernandes
d646cc95ad Fix bug #503
C++11 support on simple allocators comes for free. `aligned_allocator` does not
need to add any `construct` overloads to work with C++11 compilers.
(grafted from a1f056cf2a0318d7a8d4a4bf4c5019c09a8fdbd6
)
2013-09-10 17:08:04 +02:00
Gael Guennebaud
74beb218d2 Fix bug #554: include unistd.h before checking the presence of posix_memalign. 2013-06-26 22:49:14 +02:00
Gael Guennebaud
899c0c2b6c Clean source code and unit tests with respect to -Wunused-local-typedefs 2013-04-10 22:27:35 +02:00
Gael Guennebaud
7e04d7db02 Fix a serious bug in handmade_aligned_realloc: original data have to be moved if the alignment offset differs. 2013-04-10 13:58:20 +02:00
Gael Guennebaud
f29b4c435b Make cpuid not use %%esi -> dangerous if someone is using it. 2013-03-19 14:11:59 +01:00
Michael Schmidt
0d5a418048 Fix bug #566: rbx register has to be saved when calling cpuid on x84_64 with -fPIC and medium or large code models. 2013-03-19 14:00:42 +01:00
Gael Guennebaud
b6dc2613ac Fix bug #552: disable EIGEN_GLIBC_MALLOC_ALREADY_ALIGNED when compiling with -fsanitize=address, and allow users to manually tell whether EIGEN_MALLOC_ALREADY_ALIGNED. 2013-02-25 19:17:13 +01:00
Gael Guennebaud
25bcbfb10c Fix bug in aligned_free with windows CE 2013-02-13 19:09:31 +01:00
Gael Guennebaud
aa858cb43a add first_multiple helper function 2012-10-30 16:27:52 +01:00
Gael Guennebaud
138897cc06 fix bug #521: __cpuidex is not available on all architectures supported by MSVC 2012-10-24 10:21:41 +02:00
Gael Guennebaud
9b418afff6 Windows CE does not provide an aligned_malloc function. 2012-10-24 10:12:42 +02:00
Benoit Jacob
69124cfca2 Automatic relicensing to MPL2 using Keirs script. Manual fixup follows. 2012-07-13 14:42:47 -04:00
Gael Guennebaud
ce2e2fe336 bug #455: add support for c++11 in aligned_allocator 2012-05-03 11:55:30 +02:00
Jitse Niesen
3c412183b2 Get rid of include directives inside namespace blocks (bug #339). 2012-04-15 11:06:28 +01:00
Gael Guennebaud
99c694623a fix a dozen of warnings with MSVC, and get rid of some useless throw() 2012-02-06 15:57:51 +01:00
Zuiquan
a64407f086 Enable Eigen to compile on 'pure C/C++' Gcc environment (with no inline assembly or asm directive). Required if we want to use Eigen with Adobe Alchemy. 2012-02-02 12:05:02 +01:00
Gael Guennebaud
634fedaf68 proper C++ casting 2012-01-31 18:56:25 +01:00
Gael Guennebaud
9c86ee2695 fix static inline versus inline static issues (the former is the correct order) 2012-01-31 12:58:52 +01:00
Gael Guennebaud
8d6e394b06 workaround "empty macro argument" warning 2012-01-31 12:46:14 +01:00
Gael Guennebaud
59576014a9 fig bug #373: compilation error with clang 2.9 when exceptions are disabled (cannot reproduce with clang 3.0 or 3.1) 2011-12-05 09:44:25 +01:00
Benoit Jacob
1b98b73472 Refactor force-inlining macros and use EIGEN_ALWAYS_INLINE to force inlining of the integer overflow helpers, whose non-inlining caused major performance problems, see the mailing list thread 'Significant perf regression probably due to bug #363 patches' 2011-11-06 16:27:41 -05:00
Benoit Jacob
de69129f56 forgot inline keyword 2011-10-17 08:49:59 -04:00
Benoit Jacob
16b638c159 Throw std::bad_alloc even when exceptions are disabled, by doing new int[size_t(-1)].
Don't throw exceptions on aligned_malloc(0) (just because malloc's retval is null doesn't mean error, if size==0).
Remove EIGEN_NO_EXCEPTIONS option, use only compiler standard defines. Either exceptions are enabled or they aren't.
2011-10-17 08:44:44 -04:00
Benoit Jacob
0c6055c285 bug #363 - check for integer overflow in byte-size computations 2011-10-16 16:12:19 -04:00
Gael Guennebaud
22bff949c8 protect calls to min and max with parentheses to make Eigen compatible with default windows.h
(transplanted from 49b6e9143e1d74441924c0c313536e263e12a55c
)
2011-07-21 11:19:36 +02:00
Gael Guennebaud
f82b3ea241 fix aligned_allocator::allocate interface 2011-06-14 08:50:25 +02:00
Gael Guennebaud
6d3dee1b66 introduce a smart_copy internal function and fix sparse matrices with non POD scalar type 2011-06-09 19:04:06 +02:00
Gael Guennebaud
179d42bb2b fix bug #267: alloca is not aligned on arm 2011-05-17 21:30:12 +02:00
Gael Guennebaud
6441e8727b fix aligned_stack_memory_handler for null pointers 2011-04-21 09:00:55 +02:00
Gael Guennebaud
b8ecda5c66 clean a bit the stack allocation mechanism 2011-03-19 10:27:47 +01:00
Gael Guennebaud
290205dfc0 fix memory leak when a custom scalar throw an exception 2011-03-19 01:06:50 +01:00
Benoit Jacob
bfcad536e8 * bug #206: correctly forward computationOptions and work towards avoiding mallocs after preallocation, with unit test.
* added EIGEN_RUNTIME_NO_MALLOC and new set_is_malloc_allowed() function to implement that test
2011-03-06 20:59:25 -05:00
Gael Guennebaud
40526e24b4 fix memory leak (when conservatively resizing vectors of dynamically allocated scalar types such as bugnums) 2011-02-07 19:52:16 +01:00
Gael Guennebaud
1eb85b4cf1 allow the possibility to automatically call or not the ctors on a per scalar type basis, and disable automatic initialization of std::complex<> 2011-01-26 17:56:49 +01:00
Benoit Jacob
c7eaca50a0 __cpuidex is not (always) present in VS 2008 + SP1, it seems 2011-01-17 11:17:45 -05:00
Jose Luis Blanco
cbfab7204f Update of CPUID macros to fix segfaults in amd64 code. 2011-01-05 02:43:43 +01:00
Thomas Capricelli
7a29ae0b5c fix preprocessor checks for availability of cpuid 2010-12-28 13:46:39 +01:00
Jitse Niesen
cad73d9cdc Correct std::map fix (two commits ago); copy fix to aligned_allocator doc. 2010-11-12 12:06:24 +00:00
Benoit Jacob
4716040703 bug #86 : use internal:: namespace instead of ei_ prefix 2010-10-25 10:15:22 -04:00
Gael Guennebaud
a76ce042e6 MSVC for windows mobile does not have the errno.h file 2010-10-07 18:09:15 +02:00
Gael Guennebaud
90d6fc0e28 fix ei_aligned_delete for null pointers and non trivial dtors 2010-07-14 22:49:34 +02:00
Jitse Niesen
49747fa4a9 Various documentation improvements.
* Add short documentation for Array class
* Put all classes explicitly in Core module (where applicable)
* Section on Modules in Quick Reference Guide
* Put Page 7 after Page 6 in Contents :)
2010-07-06 13:10:08 +01:00