1 #ifndef DataFormat_Math_SSEArray_H
2 #define DataFormat_Math_SSEArray_H
12 template<
typename T,
size_t S>
16 template<
typename T,
size_t S>
22 struct ArrayMask<float, 0> {
24 Vec4<float> v; v.setMask(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff);
29 struct ArrayMask<float,1> {
36 struct ArrayMask<float,2> {
38 Vec4<float> v; v.setMask(0xffffffff, 0xffffffff, 0x0, 0x0);
43 struct ArrayMask<float,3> {
45 Vec4<float> v; v.setMask(0xffffffff, 0xffffffff, 0xffffffff, 0x0);
51 struct ArrayMask<double, 0> {
53 Vec2<double> v; v.setMask(0xffffffffffffffffLL, 0xffffffffffffffffLL);
58 struct ArrayMask<double,1> {
67 struct ArrayTraits<float, S> {
70 static const size_t size = S;
71 static const size_t ssesize = (S+3)/4;
72 static const size_t arrsize = 4*ssesize;
74 static inline Vec
__attribute__((__always_inline__)) mask(Vec
v,
size_t i) {
75 return (i==ssesize-1) ? maskLast()&v :
v;
79 for (
size_t i=0; i!=ssesize-1;++
i)
81 f(ssesize-1,maskLast());
86 struct ArrayTraits<double, S> {
89 static const size_t size = S;
90 static const size_t ssesize = (S+1)/2;
91 static const size_t arrsize = 2*ssesize;
95 template<
typename T,
size_t S>
97 typedef ArrayTraits<T,S> Traits;
98 typedef typename Traits::Vec Vec;
99 typename Vec::nativeType vec[Traits::ssesize];
102 Vec
operator[](
size_t i) {
return vec[
i];}
103 Vec
const &
operator[](
size_t i)
const{
return reinterpret_cast<Vec
const &
>(vec[
i]);}
110 #endif // CMS_USE_SSE
111 #endif // DataFormat_Math_SSEArray_H
T operator[](int i) const
struct mathSSE::Rot3 __attribute__
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
tuple size
Write out results.