Lines Matching refs:kMaxWidth
210 const int kMaxWidth = 4096 * 3; in TEST_F() local
211 align_buffer_page_end(src_a, kMaxWidth); in TEST_F()
212 align_buffer_page_end(src_b, kMaxWidth); in TEST_F()
213 memset(src_a, 0, kMaxWidth); in TEST_F()
214 memset(src_b, 0, kMaxWidth); in TEST_F()
223 MemRandomize(src_a, kMaxWidth); in TEST_F()
224 MemRandomize(src_b, kMaxWidth); in TEST_F()
226 uint32_t h0 = HammingDistance_C(src_a, src_b, kMaxWidth); in TEST_F()
230 ((benchmark_width_ * benchmark_height_ + kMaxWidth - 1) / kMaxWidth); in TEST_F()
233 h1 = HammingDistance_NEON(src_a, src_b, kMaxWidth); in TEST_F()
237 h1 = HammingDistance_AVX2(src_a, src_b, kMaxWidth); in TEST_F()
241 h1 = HammingDistance_SSE42(src_a, src_b, kMaxWidth); in TEST_F()
245 h1 = HammingDistance_SSSE3(src_a, src_b, kMaxWidth); in TEST_F()
247 h1 = HammingDistance_C(src_a, src_b, kMaxWidth); in TEST_F()
254 h1 = HammingDistance_SSE42(src_a, src_b, kMaxWidth); in TEST_F()
256 h1 = HammingDistance_C(src_a, src_b, kMaxWidth); in TEST_F()
259 h1 = HammingDistance_C(src_a, src_b, kMaxWidth); in TEST_F()
269 const int kMaxWidth = 4096 * 3; in TEST_F() local
270 align_buffer_page_end(src_a, kMaxWidth); in TEST_F()
271 align_buffer_page_end(src_b, kMaxWidth); in TEST_F()
272 memset(src_a, 0, kMaxWidth); in TEST_F()
273 memset(src_b, 0, kMaxWidth); in TEST_F()
282 MemRandomize(src_a, kMaxWidth); in TEST_F()
283 MemRandomize(src_b, kMaxWidth); in TEST_F()
285 uint32_t h0 = HammingDistance_C(src_a, src_b, kMaxWidth); in TEST_F()
289 ((benchmark_width_ * benchmark_height_ + kMaxWidth - 1) / kMaxWidth); in TEST_F()
291 h1 = HammingDistance_C(src_a, src_b, kMaxWidth); in TEST_F()
301 const int kMaxWidth = 4096 * 3; in TEST_F() local
302 align_buffer_page_end(src_a, kMaxWidth); in TEST_F()
303 align_buffer_page_end(src_b, kMaxWidth); in TEST_F()
304 memset(src_a, 0, kMaxWidth); in TEST_F()
305 memset(src_b, 0, kMaxWidth); in TEST_F()
313 MemRandomize(src_a, kMaxWidth); in TEST_F()
314 MemRandomize(src_b, kMaxWidth); in TEST_F()
316 uint32_t h0 = HammingDistance_C(src_a, src_b, kMaxWidth); in TEST_F()
320 ((benchmark_width_ * benchmark_height_ + kMaxWidth - 1) / kMaxWidth); in TEST_F()
322 h1 = ComputeHammingDistance(src_a, src_b, kMaxWidth); in TEST_F()
343 const int kMaxWidth = (benchmark_width_ * benchmark_height_ + 31) & ~31; in TEST_F() local
344 align_buffer_page_end(src_a, kMaxWidth); in TEST_F()
345 align_buffer_page_end(src_b, kMaxWidth); in TEST_F()
346 memset(src_a, 255u, kMaxWidth); in TEST_F()
347 memset(src_b, 0u, kMaxWidth); in TEST_F()
349 uint64_t h0 = ComputeHammingDistance(src_a, src_b, kMaxWidth); in TEST_F()
350 EXPECT_EQ(kMaxWidth * 8ULL, h0); in TEST_F()
354 h1 = HammingDistance_NEON(src_a, src_b, kMaxWidth); in TEST_F()
358 h1 = HammingDistance_AVX2(src_a, src_b, kMaxWidth); in TEST_F()
362 h1 = HammingDistance_SSE42(src_a, src_b, kMaxWidth); in TEST_F()
366 h1 = HammingDistance_SSSE3(src_a, src_b, kMaxWidth); in TEST_F()
368 h1 = HammingDistance_C(src_a, src_b, kMaxWidth); in TEST_F()
375 h1 = HammingDistance_SSE42(src_a, src_b, kMaxWidth); in TEST_F()
377 h1 = HammingDistance_C(src_a, src_b, kMaxWidth); in TEST_F()
380 h1 = HammingDistance_C(src_a, src_b, kMaxWidth); in TEST_F()
387 if (kMaxWidth <= kMaxOptCount) { in TEST_F()
388 EXPECT_EQ(kMaxWidth * 8U, h1); in TEST_F()
390 if (kMaxWidth * 8ULL != static_cast<uint64_t>(h1)) { in TEST_F()
394 h1, kMaxWidth * 8ULL, kMaxWidth); in TEST_F()
399 h1, kMaxWidth); in TEST_F()
425 const int kMaxWidth = 4096 * 3; in TEST_F() local
426 align_buffer_page_end(src_a, kMaxWidth); in TEST_F()
427 align_buffer_page_end(src_b, kMaxWidth); in TEST_F()
428 memset(src_a, 0, kMaxWidth); in TEST_F()
429 memset(src_b, 0, kMaxWidth); in TEST_F()
436 for (int i = 0; i < kMaxWidth; ++i) { in TEST_F()
440 memset(src_a, 0, kMaxWidth); in TEST_F()
441 memset(src_b, 0, kMaxWidth); in TEST_F()
445 ((benchmark_width_ * benchmark_height_ + kMaxWidth - 1) / kMaxWidth); in TEST_F()
447 h1 = ComputeSumSquareError(src_a, src_b, kMaxWidth); in TEST_F()
457 const int kMaxWidth = 4096 * 3; in TEST_F() local
458 align_buffer_page_end(src_a, kMaxWidth); in TEST_F()
459 align_buffer_page_end(src_b, kMaxWidth); in TEST_F()
460 memset(src_a, 0, kMaxWidth); in TEST_F()
461 memset(src_b, 0, kMaxWidth); in TEST_F()
464 err = ComputeSumSquareError(src_a, src_b, kMaxWidth); in TEST_F()
468 memset(src_a, 1, kMaxWidth); in TEST_F()
469 err = ComputeSumSquareError(src_a, src_b, kMaxWidth); in TEST_F()
471 EXPECT_EQ(static_cast<int>(err), kMaxWidth); in TEST_F()
473 memset(src_a, 190, kMaxWidth); in TEST_F()
474 memset(src_b, 193, kMaxWidth); in TEST_F()
475 err = ComputeSumSquareError(src_a, src_b, kMaxWidth); in TEST_F()
477 EXPECT_EQ(static_cast<int>(err), kMaxWidth * 3 * 3); in TEST_F()
479 for (int i = 0; i < kMaxWidth; ++i) { in TEST_F()
485 uint64_t c_err = ComputeSumSquareError(src_a, src_b, kMaxWidth); in TEST_F()
488 uint64_t opt_err = ComputeSumSquareError(src_a, src_b, kMaxWidth); in TEST_F()