unittest: less explicit Vector<T> instantiation

the ULP code lead to the requirement of abs/frexp/ldexp and more to be
implemented before any unit test was compilable. That is not usable for
implementing a new target. This can be fixed by having the functions
only instantiated when used (via templates). There may still be a small
error here, but at least NEON stuff can be compiled now.

Signed-off-by: Matthias Kretz <kretz@kde.org>
load test: fix loadArray (didn't run at all)

Signed-off-by: Oksana Shadura <oksana.shadura@cern.ch>
unittest: fix printFuzzyInfo definition

* The printFuzzyInfo function was missing the class name in the function
definition.

Signed-off-by: Matthias Kretz <kretz@kde.org>
ulp: make ulpDiffToReferenceSigned callable with any type

ulpDiffToReferenceSigned calls are useful for floating-point types only.
But to make it more convenient to use in a generic function allow all
other types as well and just return 0.

Signed-off-by: Matthias Kretz <kretz@kde.org>
Iterators: work around GCC ICE

GCC may fail (ICE) if it has to apply std::remove_reference to a type
with may_alias attribute. Since Vector::operator[] likely returns such a
type, the original declaration of the iterator value type was asking for
failure. Instead it should be safe and generic enough to just use
V::EntryType as iterator value type.

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON: stub vector.h from AVX

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON: more boilerplate interface code

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON: include logic for NEON

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON: more neon impl stub files

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON: clean up Vector<T> class for NEON

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON: ARM docs say __ARM_NEON is defined

there appears to be no documentation on runtime detection of the NEON
instruction set (at least the ARM docs don't talk about it)

Signed-off-by: Matthias Kretz <kretz@kde.org>
cmake: split support.cpp into x86 and ARM files

ARM needs a completely different implementation of these functions as
they are 100% platform specific. So I renamed the current file to
support_x86.cpp and added a new support_arm.cpp with a minimal
implementation for NEON detection.

Signed-off-by: Matthias Kretz <kretz@kde.org>
cmake: the run_*_all target needs to be conditional

If no run targets are created the run_*_all target must not be defined.

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON/cmake: build SSE/AVX stuff only on x86

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON: long double is equal to double

the type is not the same, but the precision (and sizeof)

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON: if VC_IMPL_NEON is defined we're good

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON: asm for reading the instruction pointer

Obviously the x86 asm for reading eip doesn't work. This is untested.

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON: max supported alignment is 64

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON/unittest: fix inline asm

asm on ARM uses dst,src ordering. Assigning a random value to the
program counter wasn't such a great idea. :)

Signed-off-by: Matthias Kretz <kretz@kde.org>
NEON/cmake: compile neon test targets

Signed-off-by: Matthias Kretz <kretz@kde.org>