MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / dump_double_array

Function dump_double_array

layersvt/api_dump.h:1466–1489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1464
1465template <ApiDumpFormat Format, size_t N, typename T, typename DumpElement>
1466void dump_double_array(const T(array)[][N], size_t len1, size_t len2, const ApiDumpSettings &settings, const char *type_string,
1467 const char *name, const char *element_type, int indents, DumpElement dump_element) {
1468 if (len1 == 0 || len2 == 0) {
1469 return;
1470 }
1471 dump_array_start<Format>(array, len1 * len2, settings, type_string, name, indents);
1472 for (size_t i = 0; i < len1; ++i) {
1473 for (size_t j = 0; j < len2; ++j) {
1474 std::stringstream stream;
1475 if constexpr (Format == ApiDumpFormat::Text || Format == ApiDumpFormat::Html) {
1476 stream << name;
1477 }
1478 stream << "[" << i << "][" << j << "]";
1479 std::string indexName = stream.str();
1480 dump_element(array[i][j], settings, element_type, indexName.c_str(), indents + (Format == ApiDumpFormat::Json ? 2 : 1),
1481 nullptr);
1482 if constexpr (Format == ApiDumpFormat::Json) {
1483 if (i < len1 - 1 && j < len2 - 1) settings.stream() << ',';
1484 settings.stream() << "\n";
1485 }
1486 }
1487 }
1488 dump_array_end<Format>(array, len1 * len2, settings, indents);
1489}
1490
1491template <ApiDumpFormat Format, size_t N, typename T, typename DumpElement>
1492void dump_single_array(const T (&array)[N], size_t len, const ApiDumpSettings &settings, const char *type_string, const char *name,

Callers

nothing calls this directly

Calls 1

strMethod · 0.80

Tested by

no test coverage detected