| 209 | |
| 210 | template <class ParameterType> |
| 211 | class TestListGenerator |
| 212 | { |
| 213 | protected: |
| 214 | std::vector<ParameterType> data_sets; |
| 215 | const size_t *supported_length; |
| 216 | size_t size_supported_length; |
| 217 | |
| 218 | virtual void supported_length_data() |
| 219 | { |
| 220 | // This array must be kept sorted in the ascending order |
| 221 | static const size_t supported_length_array[] = { |
| 222 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 22, 24, |
| 223 | 25, 26, 27, 28, 30, 32, 33, 35, 36, 39, 40, 42, 44, 45, 48, 49, 50, 52, 54, |
| 224 | 55, 56, 60, 63, 64, 65, 66, 70, 72, 75, 77, 78, 80, 81, 84, 88, 90, 91, 96, |
| 225 | 98, 99, 100, 104, 105, 108, 110, 112, 117, 120, 121, 125, 126, 128, 130, 132, |
| 226 | 135, 140, 143, 144, 147, 150, 154, 156, 160, 162, 165, 168, 169, 175, 176, |
| 227 | 180, 182, 189, 192, 195, 196, 198, 200, 208, 210, 216, 220, 224, 225, 231, |
| 228 | 234, 240, 242, 243, 245, 250, 252, 256, 260, 264, 270, 273, 275, 280, 286, |
| 229 | 288, 294, 297, 300, 308, 312, 315, 320, 324, 325, 330, 336, 338, 343, 350, |
| 230 | 351, 352, 360, 363, 364, 375, 378, 384, 385, 390, 392, 396, 400, 405, 416, |
| 231 | 420, 429, 432, 440, 441, 448, 450, 455, 462, 468, 480, 484, 486, 490, 495, |
| 232 | 500, 504, 507, 512, 520, 525, 528, 539, 540, 546, 550, 560, 567, 572, 576, |
| 233 | 585, 588, 594, 600, 605, 616, 624, 625, 630, 637, 640, 648, 650, 660, 672, |
| 234 | 675, 676, 686, 693, 700, 702, 704, 715, 720, 726, 728, 729, 735, 750, 756, |
| 235 | 768, 770, 780, 784, 792, 800, 810, 819, 825, 832, 840, 845, 847, 858, 864, |
| 236 | 875, 880, 882, 891, 896, 900, 910, 924, 936, 945, 960, 968, 972, 975, 980, |
| 237 | 990, 1000, 1001, 1008, 1014, 1024, 1029, 1040, 1050, 1053, 1056, 1078, 1080, |
| 238 | 1089, 1092, 1100, 1120, 1125, 1134, 1144, 1152, 1155, 1170, 1176, 1183, 1188, |
| 239 | 1200, 1210, 1215, 1225, 1232, 1248, 1250, 1260, 1274, 1280, 1287, 1296, 1300, |
| 240 | 1320, 1323, 1331, 1344, 1350, 1352, 1365, 1372, 1375, 1386, 1400, 1404, 1408, |
| 241 | 1430, 1440, 1452, 1456, 1458, 1470, 1485, 1500, 1512, 1521, 1536, 1540, 1560, |
| 242 | 1568, 1573, 1575, 1584, 1600, 1617, 1620, 1625, 1638, 1650, 1664, 1680, 1690, |
| 243 | 1694, 1701, 1715, 1716, 1728, 1750, 1755, 1760, 1764, 1782, 1792, 1800, 1815, |
| 244 | 1820, 1848, 1859, 1872, 1875, 1890, 1911, 1920, 1925, 1936, 1944, 1950, 1960, |
| 245 | 1980, 2000, 2002, 2016, 2025, 2028, 2048, 2058, 2079, 2080, 2100, 2106, 2112, |
| 246 | 2145, 2156, 2160, 2178, 2184, 2187, 2197, 2200, 2205, 2240, 2250, 2268, 2275, |
| 247 | 2288, 2304, 2310, 2340, 2352, 2366, 2376, 2400, 2401, 2420, 2430, 2450, 2457, |
| 248 | 2464, 2475, 2496, 2500, 2520, 2535, 2541, 2548, 2560, 2574, 2592, 2600, 2625, |
| 249 | 2640, 2646, 2662, 2673, 2688, 2695, 2700, 2704, 2730, 2744, 2750, 2772, 2800, |
| 250 | 2808, 2816, 2835, 2860, 2880, 2904, 2912, 2916, 2925, 2940, 2970, 3000, 3003, |
| 251 | 3024, 3025, 3042, 3072, 3080, 3087, 3120, 3125, 3136, 3146, 3150, 3159, 3168, |
| 252 | 3185, 3200, 3234, 3240, 3250, 3267, 3276, 3300, 3328, 3360, 3375, 3380, 3388, |
| 253 | 3402, 3430, 3432, 3456, 3465, 3500, 3510, 3520, 3528, 3549, 3564, 3575, 3584, |
| 254 | 3600, 3630, 3640, 3645, 3675, 3696, 3718, 3744, 3750, 3773, 3780, 3822, 3840, |
| 255 | 3850, 3861, 3872, 3888, 3900, 3920, 3960, 3969, 3993, 4000, 4004, 4032, 4050, |
| 256 | 4056, 4095, 4096 }; |
| 257 | |
| 258 | supported_length = supported_length_array; |
| 259 | size_supported_length = sizeof(supported_length_array) / sizeof(supported_length_array[0]); |
| 260 | } |
| 261 | |
| 262 | virtual void generate_1d(clfftDirection dir, clfftPrecision precision, size_t batch) |
| 263 | { |
| 264 | for (size_t i = 0; i < size_supported_length; i++) |
| 265 | { |
| 266 | std::vector<size_t> length; |
| 267 | length.push_back(supported_length[i]); |
| 268 | data_sets.push_back(ParameterType(precision, dir, CLFFT_1D, length, batch)); |
nothing calls this directly
no outgoing calls
no test coverage detected