Lines Matching refs:Vector
40 explicit VecAccess (Vector<T, VecSize>& v, int x, int y);
41 explicit VecAccess (Vector<T, VecSize>& v, int x, int y, int z);
42 explicit VecAccess (Vector<T, VecSize>& v, int x, int y, int z, int w);
44 VecAccess& operator= (const Vector<T, Size>& v);
46 operator Vector<T, Size> (void) const;
49 Vector<T, VecSize>& m_vector;
54 VecAccess<T, VecSize, Size>::VecAccess (Vector<T, VecSize>& v, int x, int y)
63 VecAccess<T, VecSize, Size>::VecAccess (Vector<T, VecSize>& v, int x, int y, int z)
73 VecAccess<T, VecSize, Size>::VecAccess (Vector<T, VecSize>& v, int x, int y, int z, int w)
84 VecAccess<T, VecSize, Size>& VecAccess<T, VecSize, Size>::operator= (const Vector<T, Size>& v)
91 // Vector class.
93 class Vector
105 explicit Vector (void);
106 explicit Vector (T s_); // replicate
107 Vector (T x_, T y_);
108 Vector (T x_, T y_, T z_);
109 Vector (T x_, T y_, T z_, T w_);
110 Vector (const Vector<T, Size>& v);
111 Vector (const T (&v)[Size]);
144 Vector<T, 1> swizzle (int a) const { DE_ASSERT(a >= 0 && a < Size); return Vector<T, 1>(m_data[a]); }
145 Vector<T, 2> swizzle (int a, int b) const { DE_ASSERT(a >= 0 && a < Size); DE_ASSERT(b >= 0 && b < Size); return Vector<T, 2>(m_data[a], m_data[b]); }
146 Vector<T, 3> swizzle (int a, int b, int c) const { DE_ASSERT(a >= 0 && a < Size); DE_ASSERT(b >= 0 && b < Size); DE_ASSERT(c >= 0 && c < Size); return Vector<T, 3>(m_data[a], m_data[b], m_data[c]); }
147 Vector<T, 4> swizzle (int a, int b, int c, int d) const { DE_ASSERT(a >= 0 && a < Size); DE_ASSERT(b >= 0 && b < Size); DE_ASSERT(c >= 0 && c < Size); DE_ASSERT(d >= 0 && d < Size); return Vector<T, 4>(m_data[a], m_data[b], m_data[c], m_data[d]); }
149 Vector<float, Size> asFloat (void) const { return cast<float>(); }
150 Vector<int, Size> asInt (void) const { return cast<int>(); }
151 Vector<deUint32, Size> asUint (void) const { return cast<deUint32>(); }
152 Vector<bool, Size> asBool (void) const { return cast<bool>(); }
155 Vector<T, Size>& operator+= (const Vector<T, Size>& v);
156 Vector<T, Size>& operator-= (const Vector<T, Size>& v);
157 Vector<T, Size>& operator= (const Vector<T, Size>& v);
162 bool operator== (const Vector<T, Size>& v) const { for (int i = 0; i < Size; i++) if (m_data[i] != v.m_data[i]) return false; return true; }
163 bool operator!= (const Vector<T, Size>& v) const { return !(*this == v); }
167 Vector<NewT, Size> cast (void) const;
170 Vector<T, NewSize> toWidth (void) const;
174 inline Vector<T, Size>::Vector (void)
181 inline Vector<T, Size>::Vector (T s)
188 inline Vector<T, Size>::Vector (T x_, T y_)
196 inline Vector<T, Size>::Vector (T x_, T y_, T z_)
205 inline Vector<T, Size>::Vector (T x_, T y_, T z_, T w_)
215 inline Vector<T, Size>::Vector (const Vector<T, Size>& v)
222 inline Vector<T, Size>& Vector<T, Size>::operator=(const Vector<T, Size>& v)
230 inline Vector<T, Size>::Vector (const T (&v)[Size])
236 // VecAccess to Vector cast.
238 VecAccess<T, VecSize, Size>::operator Vector<T, Size> (void) const
240 Vector<T, Size> vec;
249 inline Vector<NewT, Size> Vector<T, Size>::cast (void) const
251 Vector<NewT, Size> res;
260 inline Vector<T, NewSize> Vector<T, Size>::toWidth (void) const
262 Vector<T, NewSize> res;
274 inline Vector<T, Size> operator- (const Vector<T, Size>& a)
276 Vector<T, Size> res;
283 inline Vector<T, Size> operator+ (const Vector<T, Size>& a, const Vector<T, Size>& b)
285 Vector<T, Size> res;
292 inline Vector<T, Size> operator- (const Vector<T, Size>& a, const Vector<T, Size>& b)
294 Vector<T, Size> res;
301 inline Vector<T, Size> operator* (const Vector<T, Size>& a, const Vector<T, Size>& b)
303 Vector<T, Size> res;
310 inline Vector<T, Size> operator/ (const Vector<T, Size>& a, const Vector<T, Size>& b)
312 Vector<T, Size> res;
319 inline Vector<T, Size> operator<< (const Vector<T, Size>& a, const Vector<T, Size>& b)
321 Vector<T, Size> res;
328 inline Vector<T, Size> operator>> (const Vector<T, Size>& a, const Vector<T, Size>& b)
330 Vector<T, Size> res;
337 inline Vector<T, Size> operator* (T s, const Vector<T, Size>& a)
339 Vector<T, Size> res;
346 inline Vector<T, Size> operator+ (T s, const Vector<T, Size>& a)
348 Vector<T, Size> res;
355 inline Vector<T, Size> operator- (T s, const Vector<T, Size>& a)
357 Vector<T, Size> res;
364 inline Vector<T, Size> operator- (const Vector<T, Size>& a, T s)
366 Vector<T, Size> res;
373 inline Vector<T, Size> operator/ (T s, const Vector<T, Size>& a)
375 Vector<T, Size> res;
382 inline Vector<T, Size> operator* (const Vector<T, Size>& a, T s) { return s * a; }
385 inline Vector<T, Size> operator+ (const Vector<T, Size>& a, T s) { return s + a; }
388 inline Vector<T, Size> operator/ (const Vector<T, Size>& a, T s)
390 Vector<T, Size> res;
397 inline Vector<T, Size>& Vector<T, Size>::operator+= (const Vector<T, Size>& v)
405 inline Vector<T, Size>& Vector<T, Size>::operator-= (const Vector<T, Size>& v)
414 std::ostream& operator<< (std::ostream& stream, const tcu::Vector<T, Size>& vec)