• Home
  • Raw
  • Download

Lines Matching refs:arr

170     int arr[4] = {1, 2, 3, 4};  variable
176 span<int> s = { &arr[0], i };
178 CHECK(s.data() == &arr[0]);
182 CHECK(arr[j] == s[j]);
183 CHECK(arr[j] == s.at(j));
184 CHECK(arr[j] == s(j));
188 span<int> s = { &arr[i], 4-narrow_cast<ptrdiff_t>(i) };
190 CHECK(s.data() == &arr[i]);
194 CHECK(arr[j+i] == s[j]);
195 CHECK(arr[j+i] == s.at(j));
196 CHECK(arr[j+i] == s(j));
203 span<int, 2> s{&arr[0], 2};
204 CHECK((s.size() == 2 && s.data() == &arr[0]));
221 auto s = make_span(&arr[0], 2);
222 CHECK((s.size() == 2 && s.data() == &arr[0]));
243 int arr[4] = {1, 2, 3, 4}; variable
246 span<int> s{&arr[0], &arr[2]};
247 CHECK((s.size() == 2 && s.data() == &arr[0]));
252 span<int, 2> s{&arr[0], &arr[2]};
253 CHECK((s.size() == 2 && s.data() == &arr[0]));
258 span<int> s{&arr[0], &arr[0]};
259 CHECK((s.size() == 0 && s.data() == &arr[0]));
263 span<int, 0> s{&arr[0], &arr[0]};
264 CHECK((s.size() == 0 && s.data() == &arr[0]));
300 auto s = make_span(&arr[0], &arr[2]);
301 CHECK((s.size() == 2 && s.data() == &arr[0]));
306 auto s = make_span(&arr[0], &arr[0]);
307 CHECK((s.size() == 0 && s.data() == &arr[0]));
319 int arr[5] = {1, 2, 3, 4, 5}; variable
322 const span<int> s{arr};
323 CHECK((s.size() == 5 && s.data() == &arr[0]));
327 const span<int, 5> s{arr};
328 CHECK((s.size() == 5 && s.data() == &arr[0]));
335 span<int, 6> s{arr};
339 span<int, 0> s{arr};
340 CHECK((s.size() == 0 && s.data() == &arr[0]));
393 const auto s = make_span(arr);
394 CHECK((s.size() == 5 && s.data() == std::addressof(arr[0])));
422 double(*arr)[3][4] = new double[100][3][4]; variable
425 span<double> s(&arr[0][0][0], 10);
426 CHECK((s.size() == 10 && s.data() == &arr[0][0][0]));
430 auto s = make_span(&arr[0][0][0], 10);
431 CHECK((s.size() == 10 && s.data() == &arr[0][0][0]));
434 delete[] arr;
441 std::array<int, 4> arr = {1, 2, 3, 4}; variable
444 span<int> s{arr};
445 CHECK((s.size() == narrow_cast<ptrdiff_t>(arr.size()) && s.data() == arr.data()));
447 span<const int> cs{arr};
448 CHECK((cs.size() == narrow_cast<ptrdiff_t>(arr.size()) && cs.data() == arr.data()));
452 span<int, 4> s{arr};
453 CHECK((s.size() == narrow_cast<ptrdiff_t>(arr.size()) && s.data() == arr.data()));
455 span<const int, 4> cs{arr};
456 CHECK((cs.size() == narrow_cast<ptrdiff_t>(arr.size()) && cs.data() == arr.data()));
474 span<int, 2> s{arr};
475 CHECK((s.size() == 2 && s.data() == arr.data()));
477 span<const int, 2> cs{arr};
478 CHECK((cs.size() == 2 && cs.data() == arr.data()));
482 span<int, 0> s{arr};
483 CHECK((s.size() == 0 && s.data() == arr.data()));
485 span<const int, 0> cs{arr};
486 CHECK((cs.size() == 0 && cs.data() == arr.data()));
490 span<int, 5> s{arr};
509 auto s = make_span(arr);
510 CHECK((s.size() == narrow_cast<ptrdiff_t>(arr.size()) && s.data() == arr.data()));
515 span<int> s1 = make_span(arr);
535 const std::array<int, 4> arr = {1, 2, 3, 4}; variable
538 span<const int> s{arr};
539 CHECK((s.size() == narrow_cast<ptrdiff_t>(arr.size()) && s.data() == arr.data()));
543 span<const int, 4> s{arr};
544 CHECK((s.size() == narrow_cast<ptrdiff_t>(arr.size()) && s.data() == arr.data()));
556 span<const int, 2> s{arr};
557 CHECK((s.size() == 2 && s.data() == arr.data()));
561 span<const int, 0> s{arr};
562 CHECK((s.size() == 0 && s.data() == arr.data()));
566 span<const int, 5> s{arr};
578 auto s = make_span(arr);
579 CHECK((s.size() == narrow_cast<ptrdiff_t>(arr.size()) && s.data() == arr.data()));
586 std::array<const int, 4> arr = {1, 2, 3, 4}; variable
589 span<const int> s{arr};
590 CHECK((s.size() == narrow_cast<ptrdiff_t>(arr.size()) && s.data() == arr.data()));
594 span<const int, 4> s{arr};
595 CHECK((s.size() == narrow_cast<ptrdiff_t>(arr.size()) && s.data() == arr.data()));
600 span<const int, 2> s{arr};
601 CHECK((s.size() == 2 && s.data() == arr.data()));
605 span<const int, 0> s{arr};
606 CHECK((s.size() == 0 && s.data() == arr.data()));
610 span<const int, 5> s{arr};
614 span<int, 4> s{arr};
619 auto s = make_span(arr);
620 CHECK((s.size() == narrow_cast<ptrdiff_t>(arr.size()) && s.data() == arr.data()));
761 int arr[] = {3, 4, 5}; variable
763 span<const int> s2 = arr;
764 CHECK((s2.size() == 3 && s2.data() == &arr[0]));
769 auto get_temp_span = [&]() -> span<int> { return {&arr[1], 2}; }; in __anon937ad2a91b02()
770 auto use_span = [&](span<const int> s) { CHECK((s.size() == 2 && s.data() == &arr[1])); }; in __anon937ad2a91c02()
774 CHECK((s1.size() == 2 && s1.data() == &arr[1]));
780 int arr[5] = {1, 2, 3, 4, 5}; variable
783 span<int, 5> av = arr;
789 span<int, 5> av = arr;
795 span<int, 5> av = arr;
801 span<int, 5> av = arr;
819 int arr[5] = {1, 2, 3, 4, 5}; variable
822 span<int, 5> av = arr;
828 span<int, 5> av = arr;
834 span<int, 5> av = arr;
840 span<int, 5> av = arr;
857 int arr[5] = {1, 2, 3, 4, 5}; variable
860 span<int, 5> av = arr;
868 span<int, 5> av = arr;
875 span<int, 5> av = arr;
885 span<int, 5> av = arr;
894 span<int, 5> av = arr;
914 span<int> av = arr;
925 span<int, 5> av = arr;
939 int arr[4] = {1, 2, 3, 4}; variable
942 span<int> s = arr;
959 int arr[4] = {1, 2, 3, 4}; variable
962 span<int> s = arr;
1276 int arr[] = {2, 1}; variable
1277 span<int> s1 = arr;
1278 span<int> s2 = arr;
1295 int arr[] = {2, 1}; // bigger variable
1298 span<int> s2 = arr;
1335 int arr[] = {1, 2, 3}; variable
1337 span<int> s1 = {&arr[0], 2}; // shorter
1338 span<int> s2 = arr; // longer
1444 int arr[] = {1, 2, 3, 4}; variable
1447 span<int, 4> s4 = arr;
1460 span<int, 2> s = arr;
1470 span<int> s = arr;
1482 const span<int, 2> s2 = {&arr[0], 2};
1553 int arr[5] = {1, 2, 3, 4, 5}; variable
1554 span<int> s{arr};