|
@@ -89,7 +89,7 @@ void DoTest(bool dkFirst, Rand&& r)
|
89
|
89
|
return lhs < rhs;
|
90
|
90
|
});
|
91
|
91
|
double e1 = timer.Elapsed();
|
92
|
|
- DKLogW("DKStaticArray::Sort: %f (SwapMethod:%d)", e1, tmp.SwapMethod);
|
|
92
|
+ DKLogW("DKStaticArray::Sort: %f (SwapMethod:%d)", e1, tmp.UseMemoryCopy);
|
93
|
93
|
auto hash = DKHashSHA1(val, sizeof(T) * len);
|
94
|
94
|
DKLog("DKStaticArray::Sort hash: %ls", (const wchar_t*)hash.String());
|
95
|
95
|
return ResultTuple::Make(hash, e1);
|
|
@@ -108,8 +108,8 @@ void DoTest(bool dkFirst, Rand&& r)
|
108
|
108
|
}
|
109
|
109
|
else
|
110
|
110
|
{
|
111
|
|
- auto result1 = testDK(val1, MAX_SIZE);
|
112
|
|
- auto result2 = testSTL(val2, MAX_SIZE);
|
|
111
|
+ auto result1 = testSTL(val1, MAX_SIZE);
|
|
112
|
+ auto result2 = testDK(val2, MAX_SIZE);
|
113
|
113
|
if (result1.Value<0>().Compare(result2.Value<0>()))
|
114
|
114
|
DKLogE("Hash Compare: %d (ERROR)", result1.Value<0>().Compare(result2.Value<0>()));
|
115
|
115
|
else
|
|
@@ -135,23 +135,25 @@ int main(int argc, const char * argv[])
|
135
|
135
|
{
|
136
|
136
|
DKApplication app;
|
137
|
137
|
|
138
|
|
- DoTest<Value64>(true, []()->Value64
|
|
138
|
+ bool dkFirst = true;
|
|
139
|
+
|
|
140
|
+ DoTest<Value64>(dkFirst, []()->Value64
|
139
|
141
|
{
|
140
|
142
|
Value64 val = { 0 };
|
141
|
143
|
val.num = DKRandom();
|
142
|
144
|
return val;
|
143
|
145
|
});
|
144
|
|
- DoTest<Value16>(true, []()->Value16
|
|
146
|
+ DoTest<Value16>(dkFirst, []()->Value16
|
145
|
147
|
{
|
146
|
148
|
Value16 val = { 0 };
|
147
|
149
|
val.num = DKRandom();
|
148
|
150
|
return val;
|
149
|
151
|
});
|
150
|
|
- DoTest<Value8>(true, []()->Value8
|
|
152
|
+ DoTest<Value8>(dkFirst, []()->Value8
|
151
|
153
|
{
|
152
|
154
|
return { size_t(DKRandom()) | (size_t(DKRandom()) << 32) };
|
153
|
155
|
});
|
154
|
|
- DoTest<Value4>(true, []()->Value4
|
|
156
|
+ DoTest<Value4>(dkFirst, []()->Value4
|
155
|
157
|
{
|
156
|
158
|
return DKRandom();
|
157
|
159
|
});
|