- Jul 17, 2015
-
-
Ansgar Burchardt authored
Since de430584 HAVE_DUNE_HASH is always defined.
-
floating comparisons
-
- Jul 11, 2015
-
-
Oliver Sander authored
-
- Jul 10, 2015
-
-
Jö Fahlke authored
Point to proposal for C++17 make_array(), and point out the differences of our implementation.
-
Jö Fahlke authored
That inhibits RVO and actually makes the code slower. And even if the compiler decides against RVO, the standard requires that he moves from the object, if possible. See Scott Meyers "Effective Modern C++", second half of Item 25. Thanks Markus Blatt for noticing.
-
Use std::array instead of Dune::array. [make_array] use variadic template instead of different specialization
-
- Jul 03, 2015
-
-
Steffen Müthing authored
IteratorRanges are convenient for storing ranges of iterators into a larger container, e.g. for the per-codim GeometryTypes in an IndexSet. Unfortunately, you can't just create an array of IteratorRanges right now because they can neither be copied, nor are they default-constructible. This patch fixes that problem and also adds a second typedef const_iterator to make IteratorRange work in contexts where the iterating code isn't using range-based for and assumes a const object.
-
- Jun 30, 2015
-
-
Ansgar Burchardt authored
-
Dominic Kempf authored
With the recent changes to bigunsignedint, the index cannot be initialized with a negative value anymore. We change this to 1 to overcome the problem. This commit together with the recent bugfixes by Ansgar fixes the AMG code on master.
-
Ansgar Burchardt authored
-
Ansgar Burchardt authored
Since 0c697d8d messages of size zero are no longer sent. This can reduce the number of requests we have to wait for.
-
Ansgar Burchardt authored
The storage of bigunsignedint was changed to std::uint16_t in commit 541b3dfc. This implements the same change for the MPITraits<bigunsignedint<k>> Note that this assumes that MPITraits<std::uint16_t> is defined. This is the case as long as uint16_t maps to one of the standard integer types (unsigned char/short/int/long). Thanks to Markus for pointing this out. Reference: https://dune-project.org/flyspray/index.php?do=details&task_id=1657#comment6393
-
- Jun 29, 2015
-
-
Oliver Sander authored
-
- Jun 19, 2015
-
-
Ansgar Burchardt authored
-
- Jun 17, 2015
-
-
Dominic Kempf authored
This bug could only be found outside Germany :D
-
- Jun 16, 2015
-
-
Christian Engwer authored
the first problem was that I accidentially enabled the ScalarOrderingTest, but this forced me to investigate further and I found out how this works, or not works. We have to add the comparison operators to FieldVector, as the cast operator does not always match, e.g. in the case of GMPField.
-
Carsten Gräser authored
Before the test was not active since '#if HAVE_GMP' fails if the gmp-flags where not added.
-
- Jun 13, 2015
-
-
Christian Engwer authored
in order to make GMPField work in more situations, we add a constrctor, which matches all scalar data types, which can me converted to K. We deliberately exclude K from the template match.
-
Christian Engwer authored
-
Christian Engwer authored
we first import function like std::max into the local scope and the call max(a,b) instead of std::max(a,b). This allows to match specializations for other data types via ADL.
-
Christian Engwer authored
-
Christian Engwer authored
The templated constructor of GMPField fatched everything. We reduce the constructor to those scalar values, which are convertible to mpf_class. As this removes the constructor from char* we explicitly add constructor from char* and std::string. This is the main part to fix FS#1665
-
Christian Engwer authored
most of the tests work. std::complex<GMPField> does not work as expected, but this is perhaps something we don't want to support. As std::complex does not allow to initialize with other parameters than the data type itself, we can not initialize from int or other compatible scalar values. The smae problem occures when interacting with int values directly.
-
- May 25, 2015
-
-
Christoph Grüninger authored
-
Christoph Grüninger authored
Fixes FS#FS#1649.
-
- May 12, 2015
-
-
Ansgar Burchardt authored
This closes FS#1651.
-
- May 11, 2015
-
-
Ansgar Burchardt authored
ptrdiff_t is a signed integer type and so the expression (std::uintptr_t)(ptr) % page_size could become a negative value. In this case the page_ptr would be the address of the next page after the allocation. This wrong behaviour could be observed on (32bit) PowerPC: here ptr was 0xf78cfe00 and page_ptr was calculated as 0xf78d0000 instead of the correct 0xf78c0000.
-
Steffen Müthing authored
The std::numeric_limits specialization for bigunsignedint requires access to the internal state of bigunsignedint. Previously, the correct specialization of std::numeric_limits was a friend of bigunsignedint, but that creates problems on recent versions of clang with the alternative libc++ library, because that library declares the base template of std::numeric_limits as a class and clang subsequently complains if the friend declaration uses 'struct'. Unfortunately, libstdc++ uses a struct, making it impossible to keep clang happy for both standard libraries. So we introduce a helper class that provides access to the internal state and which now becomes a friend of bigunsignedint. The numeric_limits specialization inherits from the helper to use it.
-
Steffen Müthing authored
-
Steffen Müthing authored
According to the standard, all specializations of std::hash must export argument_type and result_type [20.8.12/1]. The version of libc++ (LLVM's alternative C++ standard library) tripped over this requirement on my machine, so this patch adds the typedefs.
-
Ansgar Burchardt authored
-
Ansgar Burchardt authored
-
Ansgar Burchardt authored
-
Ansgar Burchardt authored
-
Ansgar Burchardt authored
With just the two overloaded constructors bigunsignedint(int) bigunsigendint(uintmax_t) trying to call the constructor with any integer type T different from int and uintmax_t results in an ambiguous call: the promotion of T to either int or uintmax_t are ranked the same. (Note that this does not depend on the specific choice of int and uintmax_t.) This patch provides a templated constructor for all signed integer types which is ranked over the constructor taking an uintmax_t, making overload resolution unambiguous for signed integer types. By also "hiding" it for unsigned types using enable_if, the overload resolution for unsigned integer types is also unambiguous; there is only a single viable candidate left: the one taking an uintmax_t.
-
Ansgar Burchardt authored
Use the fixed-width integer types introduced in C++11 instead of making assumptions on the size of integers. The following changes were implemented: unsigned short used to store the bigunsignedint: Changed type to uint16_t. The implementation requires this to be a 16-bit type. int, unsigned int used to store intermediates: Changed type to (u)int_fast32_t. This is enough to hold sums, products or differences of two uint16_t integers. std::size_t used as parameter in constructor and arithmetic operators: Changed type to uintmax_t. Any unsigned integer type should be usable in conjunction with bigunsignedint. Return value of touint() member function: Changed type to uint_least32_t. The current implementation only returns the last two "digits" (of 16 bits each).
-
- May 08, 2015
-
-
Ansgar Burchardt authored
-
Ansgar Burchardt authored
-
- May 06, 2015
-
-
Ansgar Burchardt authored
-
Ansgar Burchardt authored
This change should make formatString safe to use in multi-threaded programs. This fixes FS#1636.
-