C++
C#
VB
JScript
All

# saturated_simd_block

Copyright (C) 2005 IENT-RWTH Aachen

template<class G> inline typename SaturatedSimdBlock< Vector<G> >::self saturated_simd_block( Vector<G> &X)
template<class G> inline typename SaturatedSimdBlock<const Vector<G> >::self saturated_simd_block(const Vector<G> &X)
template<class G> inline typename SaturatedSimdBlock< Matrix<G> >::self saturated_simd_block( Matrix<G> &X)
template<class G> inline typename SaturatedSimdBlock<const Matrix<G> >::self saturated_simd_block(const Matrix<G> &X)

Decomposition in blocks for parallel calculation with saturated SIMD instructions

Parameters

X | The array to decompose

Returns

An array representing every blocks that fit in a SIMD register

Remarks

Only a few operations (addition, substraction) differ from unsatarated operations, and only for a few data types (char, unsigned char, short, unsigned short).

Example

    DenseVector<unsigned char>::self X(16, 250);
    DenseVector<unsigned char>::self Y(16, 10);
    cout << simd_block(X)+10 << endl; // 4 4 4...
    cout << saturated_simd_block(X)+10 << endl; // 255 255 255...

See Also

simd_block, simd_unaligned_block, saturated_simd_unaligned_block