depth: make constructor explicit

This commit is contained in:
Justin Viiret
2017-03-30 16:33:11 +11:00
committed by Matthew Barr
parent 37cb93e60f
commit cf82924a39
17 changed files with 248 additions and 221 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Intel Corporation
* Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -106,96 +106,96 @@ private:
static const RepeatTestInfo repeatTests[] = {
// Fixed repeats -- ring model
{ REPEAT_RING, 2, 2 },
{ REPEAT_RING, 4, 4 },
{ REPEAT_RING, 10, 10 },
{ REPEAT_RING, 16, 16 },
{ REPEAT_RING, 20, 20 },
{ REPEAT_RING, 30, 30 },
{ REPEAT_RING, 50, 50 },
{ REPEAT_RING, 64, 64 },
{ REPEAT_RING, 65, 65 },
{ REPEAT_RING, 100, 100 },
{ REPEAT_RING, 200, 200 },
{ REPEAT_RING, 1000, 1000 },
{ REPEAT_RING, 4100, 4100 },
{ REPEAT_RING, 16000, 16000 },
{ REPEAT_RING, depth(2), depth(2) },
{ REPEAT_RING, depth(4), depth(4) },
{ REPEAT_RING, depth(10), depth(10) },
{ REPEAT_RING, depth(16), depth(16) },
{ REPEAT_RING, depth(20), depth(20) },
{ REPEAT_RING, depth(30), depth(30) },
{ REPEAT_RING, depth(50), depth(50) },
{ REPEAT_RING, depth(64), depth(64) },
{ REPEAT_RING, depth(65), depth(65) },
{ REPEAT_RING, depth(100), depth(100) },
{ REPEAT_RING, depth(200), depth(200) },
{ REPEAT_RING, depth(1000), depth(1000) },
{ REPEAT_RING, depth(4100), depth(4100) },
{ REPEAT_RING, depth(16000), depth(16000) },
// {0, N} repeats -- last model
{ REPEAT_LAST, 0, 4 },
{ REPEAT_LAST, 0, 10 },
{ REPEAT_LAST, 0, 20 },
{ REPEAT_LAST, 0, 30 },
{ REPEAT_LAST, 0, 50 },
{ REPEAT_LAST, 0, 100 },
{ REPEAT_LAST, 0, 200 },
{ REPEAT_LAST, 0, 1000 },
{ REPEAT_LAST, 0, 16000 },
{ REPEAT_LAST, depth(0), depth(4) },
{ REPEAT_LAST, depth(0), depth(10) },
{ REPEAT_LAST, depth(0), depth(20) },
{ REPEAT_LAST, depth(0), depth(30) },
{ REPEAT_LAST, depth(0), depth(50) },
{ REPEAT_LAST, depth(0), depth(100) },
{ REPEAT_LAST, depth(0), depth(200) },
{ REPEAT_LAST, depth(0), depth(1000) },
{ REPEAT_LAST, depth(0), depth(16000) },
// {0, N} repeats -- ring model (though we use 'last' model in practice)
{ REPEAT_RING, 0, 2 },
{ REPEAT_RING, 0, 4 },
{ REPEAT_RING, 0, 10 },
{ REPEAT_RING, 0, 20 },
{ REPEAT_RING, 0, 30 },
{ REPEAT_RING, 0, 50 },
{ REPEAT_RING, 0, 64 },
{ REPEAT_RING, 0, 65 },
{ REPEAT_RING, 0, 100 },
{ REPEAT_RING, 0, 200 },
{ REPEAT_RING, 0, 1000 },
{ REPEAT_RING, 0, 16000 },
{ REPEAT_RING, depth(0), depth(2) },
{ REPEAT_RING, depth(0), depth(4) },
{ REPEAT_RING, depth(0), depth(10) },
{ REPEAT_RING, depth(0), depth(20) },
{ REPEAT_RING, depth(0), depth(30) },
{ REPEAT_RING, depth(0), depth(50) },
{ REPEAT_RING, depth(0), depth(64) },
{ REPEAT_RING, depth(0), depth(65) },
{ REPEAT_RING, depth(0), depth(100) },
{ REPEAT_RING, depth(0), depth(200) },
{ REPEAT_RING, depth(0), depth(1000) },
{ REPEAT_RING, depth(0), depth(16000) },
// {N, M} repeats -- ring model
{ REPEAT_RING, 2, 3 },
{ REPEAT_RING, 1, 4 },
{ REPEAT_RING, 5, 10 },
{ REPEAT_RING, 10, 20 },
{ REPEAT_RING, 10, 50 },
{ REPEAT_RING, 50, 60 },
{ REPEAT_RING, 100, 200 },
{ REPEAT_RING, 1, 200 },
{ REPEAT_RING, 10, 16000 },
{ REPEAT_RING, 10000, 16000 },
{ REPEAT_RING, depth(2), depth(3) },
{ REPEAT_RING, depth(1), depth(4) },
{ REPEAT_RING, depth(5), depth(10) },
{ REPEAT_RING, depth(10), depth(20) },
{ REPEAT_RING, depth(10), depth(50) },
{ REPEAT_RING, depth(50), depth(60) },
{ REPEAT_RING, depth(100), depth(200) },
{ REPEAT_RING, depth(1), depth(200) },
{ REPEAT_RING, depth(10), depth(16000) },
{ REPEAT_RING, depth(10000), depth(16000) },
// {N, M} repeats -- range model
{ REPEAT_RANGE, 1, 4 },
{ REPEAT_RANGE, 5, 10 },
{ REPEAT_RANGE, 10, 20 },
{ REPEAT_RANGE, 10, 50 },
{ REPEAT_RANGE, 50, 60 },
{ REPEAT_RANGE, 100, 200 },
{ REPEAT_RANGE, 1, 200 },
{ REPEAT_RANGE, 10, 16000 },
{ REPEAT_RANGE, 10000, 16000 },
{ REPEAT_RANGE, depth(1), depth(4) },
{ REPEAT_RANGE, depth(5), depth(10) },
{ REPEAT_RANGE, depth(10), depth(20) },
{ REPEAT_RANGE, depth(10), depth(50) },
{ REPEAT_RANGE, depth(50), depth(60) },
{ REPEAT_RANGE, depth(100), depth(200) },
{ REPEAT_RANGE, depth(1), depth(200) },
{ REPEAT_RANGE, depth(10), depth(16000) },
{ REPEAT_RANGE, depth(10000), depth(16000) },
// {N,M} repeats -- small bitmap model
{ REPEAT_BITMAP, 1, 2 },
{ REPEAT_BITMAP, 5, 10 },
{ REPEAT_BITMAP, 10, 20 },
{ REPEAT_BITMAP, 20, 40 },
{ REPEAT_BITMAP, 1, 63 },
{ REPEAT_BITMAP, 50, 63 },
{ REPEAT_BITMAP, depth(1), depth(2) },
{ REPEAT_BITMAP, depth(5), depth(10) },
{ REPEAT_BITMAP, depth(10), depth(20) },
{ REPEAT_BITMAP, depth(20), depth(40) },
{ REPEAT_BITMAP, depth(1), depth(63) },
{ REPEAT_BITMAP, depth(50), depth(63) },
// {N,M} repeats -- trailer model
{ REPEAT_TRAILER, 1, 2 },
{ REPEAT_TRAILER, 8, 8 },
{ REPEAT_TRAILER, 0, 8 },
{ REPEAT_TRAILER, 10, 20 },
{ REPEAT_TRAILER, 1, 32 },
{ REPEAT_TRAILER, 64, 64 },
{ REPEAT_TRAILER, 1, 64 },
{ REPEAT_TRAILER, 1, 100 },
{ REPEAT_TRAILER, 1, 2000 },
{ REPEAT_TRAILER, 50, 200 },
{ REPEAT_TRAILER, 50, 1000 },
{ REPEAT_TRAILER, 64, 1024 },
{ REPEAT_TRAILER, depth(1), depth(2) },
{ REPEAT_TRAILER, depth(8), depth(8) },
{ REPEAT_TRAILER, depth(0), depth(8) },
{ REPEAT_TRAILER, depth(10), depth(20) },
{ REPEAT_TRAILER, depth(1), depth(32) },
{ REPEAT_TRAILER, depth(64), depth(64) },
{ REPEAT_TRAILER, depth(1), depth(64) },
{ REPEAT_TRAILER, depth(1), depth(100) },
{ REPEAT_TRAILER, depth(1), depth(2000) },
{ REPEAT_TRAILER, depth(50), depth(200) },
{ REPEAT_TRAILER, depth(50), depth(1000) },
{ REPEAT_TRAILER, depth(64), depth(1024) },
// {N,} repeats -- first model
{ REPEAT_FIRST, 0, depth::infinity() },
{ REPEAT_FIRST, 1, depth::infinity() },
{ REPEAT_FIRST, 4, depth::infinity() },
{ REPEAT_FIRST, 10, depth::infinity() },
{ REPEAT_FIRST, 50, depth::infinity() },
{ REPEAT_FIRST, 100, depth::infinity() },
{ REPEAT_FIRST, 1000, depth::infinity() },
{ REPEAT_FIRST, 3000, depth::infinity() },
{ REPEAT_FIRST, 10000, depth::infinity() },
{ REPEAT_FIRST, depth(0), depth::infinity() },
{ REPEAT_FIRST, depth(1), depth::infinity() },
{ REPEAT_FIRST, depth(4), depth::infinity() },
{ REPEAT_FIRST, depth(10), depth::infinity() },
{ REPEAT_FIRST, depth(50), depth::infinity() },
{ REPEAT_FIRST, depth(100), depth::infinity() },
{ REPEAT_FIRST, depth(1000), depth::infinity() },
{ REPEAT_FIRST, depth(3000), depth::infinity() },
{ REPEAT_FIRST, depth(10000), depth::infinity() },
// {,} repeats -- always
{ REPEAT_ALWAYS, 0, depth::infinity() },
{ REPEAT_ALWAYS, depth(0), depth::infinity() },
};
INSTANTIATE_TEST_CASE_P(Repeat, RepeatTest, ValuesIn(repeatTests));
@@ -508,55 +508,55 @@ const u32 sparsePeriods[] = {
static
const RepeatTestInfo sparseRepeats[] = {
// Fixed repeats
{ REPEAT_SPARSE_OPTIMAL_P, 10, 10 },
{ REPEAT_SPARSE_OPTIMAL_P, 20, 20 },
{ REPEAT_SPARSE_OPTIMAL_P, 40, 40 },
{ REPEAT_SPARSE_OPTIMAL_P, 80, 80 },
{ REPEAT_SPARSE_OPTIMAL_P, 100, 100 },
{ REPEAT_SPARSE_OPTIMAL_P, 150, 150 },
{ REPEAT_SPARSE_OPTIMAL_P, 200, 200 },
{ REPEAT_SPARSE_OPTIMAL_P, 250, 250 },
{ REPEAT_SPARSE_OPTIMAL_P, 300, 300 },
{ REPEAT_SPARSE_OPTIMAL_P, 350, 350 },
{ REPEAT_SPARSE_OPTIMAL_P, 400, 400 },
{ REPEAT_SPARSE_OPTIMAL_P, 500, 500 },
{ REPEAT_SPARSE_OPTIMAL_P, 600, 600 },
{ REPEAT_SPARSE_OPTIMAL_P, 800, 800 },
{ REPEAT_SPARSE_OPTIMAL_P, 1000, 1000 },
{ REPEAT_SPARSE_OPTIMAL_P, 1500, 1500 },
{ REPEAT_SPARSE_OPTIMAL_P, 2000, 2000 },
{ REPEAT_SPARSE_OPTIMAL_P, 2500, 2500 },
{ REPEAT_SPARSE_OPTIMAL_P, 3000, 3000 },
{ REPEAT_SPARSE_OPTIMAL_P, 3500, 3500 },
{ REPEAT_SPARSE_OPTIMAL_P, 4000, 4000 },
{ REPEAT_SPARSE_OPTIMAL_P, 4500, 4500 },
{ REPEAT_SPARSE_OPTIMAL_P, 5000, 5000 },
{ REPEAT_SPARSE_OPTIMAL_P, 65534, 65534 },
{ REPEAT_SPARSE_OPTIMAL_P, depth(10), depth(10) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(20), depth(20) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(40), depth(40) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(80), depth(80) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(100), depth(100) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(150), depth(150) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(200), depth(200) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(250), depth(250) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(300), depth(300) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(350), depth(350) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(400), depth(400) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(500), depth(500) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(600), depth(600) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(800), depth(800) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(1000), depth(1000) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(1500), depth(1500) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(2000), depth(2000) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(2500), depth(2500) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(3000), depth(3000) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(3500), depth(3500) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(4000), depth(4000) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(4500), depth(4500) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(5000), depth(5000) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(65534), depth(65534) },
// {N, M} repeats
{ REPEAT_SPARSE_OPTIMAL_P, 10, 20 },
{ REPEAT_SPARSE_OPTIMAL_P, 20, 40 },
{ REPEAT_SPARSE_OPTIMAL_P, 40, 80 },
{ REPEAT_SPARSE_OPTIMAL_P, 80, 100 },
{ REPEAT_SPARSE_OPTIMAL_P, 100, 120 },
{ REPEAT_SPARSE_OPTIMAL_P, 150, 180 },
{ REPEAT_SPARSE_OPTIMAL_P, 200, 400 },
{ REPEAT_SPARSE_OPTIMAL_P, 250, 500 },
{ REPEAT_SPARSE_OPTIMAL_P, 300, 400 },
{ REPEAT_SPARSE_OPTIMAL_P, 350, 500 },
{ REPEAT_SPARSE_OPTIMAL_P, 400, 500 },
{ REPEAT_SPARSE_OPTIMAL_P, 500, 600 },
{ REPEAT_SPARSE_OPTIMAL_P, 600, 700 },
{ REPEAT_SPARSE_OPTIMAL_P, 800, 1000 },
{ REPEAT_SPARSE_OPTIMAL_P, 1000, 1200 },
{ REPEAT_SPARSE_OPTIMAL_P, 1500, 1800 },
{ REPEAT_SPARSE_OPTIMAL_P, 2000, 4000 },
{ REPEAT_SPARSE_OPTIMAL_P, 2500, 3000 },
{ REPEAT_SPARSE_OPTIMAL_P, 3000, 3500 },
{ REPEAT_SPARSE_OPTIMAL_P, 3500, 4000 },
{ REPEAT_SPARSE_OPTIMAL_P, 4000, 8000 },
{ REPEAT_SPARSE_OPTIMAL_P, 4500, 8000 },
{ REPEAT_SPARSE_OPTIMAL_P, 5000, 5001 },
{ REPEAT_SPARSE_OPTIMAL_P, 60000, 65534 }
{ REPEAT_SPARSE_OPTIMAL_P, depth(10), depth(20) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(20), depth(40) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(40), depth(80) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(80), depth(100) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(100), depth(120) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(150), depth(180) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(200), depth(400) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(250), depth(500) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(300), depth(400) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(350), depth(500) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(400), depth(500) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(500), depth(600) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(600), depth(700) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(800), depth(1000) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(1000), depth(1200) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(1500), depth(1800) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(2000), depth(4000) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(2500), depth(3000) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(3000), depth(3500) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(3500), depth(4000) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(4000), depth(8000) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(4500), depth(8000) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(5000), depth(5001) },
{ REPEAT_SPARSE_OPTIMAL_P, depth(60000), depth(65534) }
};
static