개정판 72424099
Markus.ImageComparer/ImageComparerBase.cs Parallel.ForEach 제거
Change-Id: I2875826245d2ce1530ffb6ffe712615d17b4a36e
ImageComparer/Markus.ImageComparer/ImageComparerBase.cs | ||
---|---|---|
161 | 161 |
System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); |
162 | 162 |
stopwatch.Start(); |
163 | 163 |
|
164 |
Parallel.ForEach(heightRange, (y) =>
|
|
164 |
foreach (var y in heightRange)
|
|
165 | 165 |
{ |
166 |
Parallel.ForEach(widthRange, (x) =>
|
|
166 |
foreach (var x in widthRange)
|
|
167 | 167 |
{ |
168 | 168 |
var rect = DataMatchScore(data, x, y, width, height, block); |
169 | 169 |
|
... | ... | |
171 | 171 |
{ |
172 | 172 |
results.Add(rect.Value); |
173 | 173 |
} |
174 |
}); |
|
175 |
}); |
|
174 |
} |
|
175 |
} |
|
176 |
|
|
177 |
//Parallel.ForEach(heightRange, (y) => |
|
178 |
//{ |
|
179 |
// Parallel.ForEach(widthRange, (x) => |
|
180 |
// { |
|
181 |
// var rect = DataMatchScore(data, x, y, width, height, block); |
|
182 |
|
|
183 |
// if (rect != null) |
|
184 |
// { |
|
185 |
// results.Add(rect.Value); |
|
186 |
// } |
|
187 |
// }); |
|
188 |
//}); |
|
189 |
//Parallel.ForEach(heightRange, (y) => |
|
190 |
//{ |
|
191 |
// Parallel.ForEach(widthRange, (x) => |
|
192 |
// { |
|
193 |
// var rect = DataMatchScore(data, x, y, width, height, block); |
|
194 |
|
|
195 |
// if (rect != null) |
|
196 |
// { |
|
197 |
// results.Add(rect.Value); |
|
198 |
// } |
|
199 |
// }); |
|
200 |
//}); |
|
176 | 201 |
|
177 | 202 |
System.Diagnostics.Debug.WriteLine("1 - " + new TimeSpan(stopwatch.ElapsedTicks)); |
178 | 203 |
return results; |
내보내기 Unified diff