Browse Source

no message

Hongtae Kim 6 years ago
parent
commit
a14d305fd4
1 changed files with 9 additions and 7 deletions
  1. 9
    7
      TestApp1/TestApp1.cpp

+ 9
- 7
TestApp1/TestApp1.cpp View File

89
 			return lhs < rhs;
89
 			return lhs < rhs;
90
 		});
90
 		});
91
 		double e1 = timer.Elapsed();
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
 		auto hash = DKHashSHA1(val, sizeof(T) * len);
93
 		auto hash = DKHashSHA1(val, sizeof(T) * len);
94
 		DKLog("DKStaticArray::Sort hash: %ls", (const wchar_t*)hash.String());
94
 		DKLog("DKStaticArray::Sort hash: %ls", (const wchar_t*)hash.String());
95
 		return ResultTuple::Make(hash, e1);
95
 		return ResultTuple::Make(hash, e1);
108
 	}
108
 	}
109
 	else
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
 		if (result1.Value<0>().Compare(result2.Value<0>()))
113
 		if (result1.Value<0>().Compare(result2.Value<0>()))
114
 			DKLogE("Hash Compare: %d (ERROR)", result1.Value<0>().Compare(result2.Value<0>()));
114
 			DKLogE("Hash Compare: %d (ERROR)", result1.Value<0>().Compare(result2.Value<0>()));
115
 		else
115
 		else
135
 {
135
 {
136
 	DKApplication app;
136
 	DKApplication app;
137
 
137
 
138
-	DoTest<Value64>(true, []()->Value64
138
+	bool dkFirst = true;
139
+
140
+	DoTest<Value64>(dkFirst, []()->Value64
139
 	{
141
 	{
140
 		Value64 val = { 0 };
142
 		Value64 val = { 0 };
141
 		val.num = DKRandom();
143
 		val.num = DKRandom();
142
 		return val;
144
 		return val;
143
 	});
145
 	});
144
-	DoTest<Value16>(true, []()->Value16
146
+	DoTest<Value16>(dkFirst, []()->Value16
145
 	{
147
 	{
146
 		Value16 val = { 0 };
148
 		Value16 val = { 0 };
147
 		val.num = DKRandom();
149
 		val.num = DKRandom();
148
 		return val;
150
 		return val;
149
 	});
151
 	});
150
-	DoTest<Value8>(true, []()->Value8
152
+	DoTest<Value8>(dkFirst, []()->Value8
151
 	{
153
 	{
152
 		return { size_t(DKRandom()) | (size_t(DKRandom()) << 32) };
154
 		return { size_t(DKRandom()) | (size_t(DKRandom()) << 32) };
153
 	});
155
 	});
154
-	DoTest<Value4>(true, []()->Value4
156
+	DoTest<Value4>(dkFirst, []()->Value4
155
 	{
157
 	{
156
 		return DKRandom();
158
 		return DKRandom();
157
 	});
159
 	});