simdarray: testModulo compiles and passes

- implement simd_array::assign
- this needs simd_array to be a friend of simd_mask_array (I should look
  into an accessor function instead)
- added non-const begin() overload to make the non-const operator[]
  compilable

refs #613

Signed-off-by: Matthias Kretz <kretz@kde.org>
simdarray: replace friend class with friend data accessor

add a bit of encapsulation by not making everything friend

Signed-off-by: Matthias Kretz <kretz@kde.org>
simdarray: implement and test operator!

refs #613

Signed-off-by: Matthias Kretz <kretz@kde.org>
simdarray: implement and test operator-

refs #613

Signed-off-by: Matthias Kretz <kretz@kde.org>
simd_cast: remove some code duplication

refs #598

Signed-off-by: Matthias Kretz <kretz@kde.org>
make permute helper accept Const0 args for zeroing

_mm256_permute2f128_* can zero the reult in addition to permutation. Now
this is also possible via the Mem::permute helpers.

Signed-off-by: Matthias Kretz <kretz@kde.org>
make include guard more unique

Signed-off-by: Matthias Kretz <kretz@kde.org>
simd_cast: implemented for AVX

refs #598

Signed-off-by: Matthias Kretz <kretz@kde.org>
new trait: entry_type_of<T>

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

added a comment for why the #ifdef is there

Signed-off-by: Matthias Kretz <kretz@kde.org>
simd_cast: mark as [[const]]

cast functions are perfect candidates for optimization: with the same
input value several invocations should be folded into a single one.

refs #598

Signed-off-by: Matthias Kretz <kretz@kde.org>
simd_cast: conversions from SSE::int_v to AVX

The SSE::int_v conversions to AVX vectors are most important because the
IndexType member type uses SSE::int_v. This should make it work.

refs #598

Signed-off-by: Matthias Kretz <kretz@kde.org>
simd_cast: casts between Scalar and SSE vectors

refs #598, #613

Signed-off-by: Matthias Kretz <kretz@kde.org>
Vector: return const-ref VectorType from data() const

Signed-off-by: Matthias Kretz <kretz@kde.org>
Scalar::Vector: use VectorType member type

for Scalar VectorType == EntryType, but still, for generality I rather
want to have the member type defined and used

Signed-off-by: Matthias Kretz <kretz@kde.org>
include order: define Scalar types first

With Scalar types defined first it is easier to have a clear dependency
chain: Scalar will always be available, thus the code in SSE and AVX can
use types from that namespace.

Signed-off-by: Matthias Kretz <kretz@kde.org>
simd_mask: forward decl for mask type

Signed-off-by: Matthias Kretz <kretz@kde.org>
allMasks: simplify for more efficiency

Now the mask permutations simply take the bit pattern from the argument
int. The previous implementation was a hack and not suitable at all for
simd_array<T, 32>.

Signed-off-by: Matthias Kretz <kretz@kde.org>
simdarray: implicit conversions between simdarray

using the simd_cast abstraction and the previously developed Segment
helper type the simdarray types of equal N can now implicitly convert
between one another

refs #613

Signed-off-by: Matthias Kretz <kretz@kde.org>
simdarray: non-member binary operators

Generic implementation of binary operators involving simdarray objects.
It determines the promoted simdarray type using the scalar type
promotion rules.

refs #613

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