1 #ifndef _TCUSEEDBUILDER_HPP
2 #define _TCUSEEDBUILDER_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program Tester Core
5 * ----------------------------------------
7 * Copyright 2014 The Android Open Source Project
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 * \brief Utility class to build seeds from different data types.
25 * Values are first XORed with type specifig mask, which makes sure that
26 * two values with different types, but same bit presentation produce
27 * different results. Then values are passed through 32 bit crc.
28 *//*--------------------------------------------------------------------*/
30 #include "tcuDefs.hpp"
31 #include "tcuVector.hpp"
43 deUint32 get (void) const { return m_hash; }
44 void feed (size_t size, const void* ptr);
48 } DE_WARN_UNUSED_TYPE;
50 SeedBuilder& operator<< (SeedBuilder& builder, bool value);
51 SeedBuilder& operator<< (SeedBuilder& builder, deInt8 value);
52 SeedBuilder& operator<< (SeedBuilder& builder, deUint8 value);
54 SeedBuilder& operator<< (SeedBuilder& builder, deInt16 value);
55 SeedBuilder& operator<< (SeedBuilder& builder, deUint16 value);
57 SeedBuilder& operator<< (SeedBuilder& builder, deInt32 value);
58 SeedBuilder& operator<< (SeedBuilder& builder, deUint32 value);
60 SeedBuilder& operator<< (SeedBuilder& builder, deInt64 value);
61 SeedBuilder& operator<< (SeedBuilder& builder, deUint64 value);
63 SeedBuilder& operator<< (SeedBuilder& builder, float value);
64 SeedBuilder& operator<< (SeedBuilder& builder, double value);
66 SeedBuilder& operator<< (SeedBuilder& builder, const std::string& value);
68 template<class T, int Size>
69 SeedBuilder& operator<< (SeedBuilder& builder, const tcu::Vector<T, Size>& value)
71 for (int i = 0; i < Size; i++)
79 #endif // _TCUSEEDBUILDER_HPP