MCPcopy Create free account
hub / github.com/AdaptiveCpp/AdaptiveCpp / print_array

Function print_array

src/common/appdb.cpp:31–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30template <class ArrayT>
31void print_array(std::ostream &ostr, const std::string &name, const ArrayT &a,
32 const std::string &element_type_name, int indentation_level) {
33 print_key_value_pair(ostr, name, "<array>", indentation_level);
34 for(int i = 0; i < a.size(); ++i) {
35 if constexpr(std::is_fundamental_v<typename ArrayT::value_type>)
36 print_key_value_pair(ostr, std::to_string(i), a[i], indentation_level+1);
37 else {
38 print_key_value_pair(ostr, std::to_string(i), "<" + element_type_name + ">",
39 indentation_level + 1);
40 a[i].dump(ostr, indentation_level + 2);
41 }
42 }
43}
44}
45
46void kernel_arg_value_statistics::dump(std::ostream& ostr, int indentation_level) const {

Callers 1

dumpMethod · 0.85

Calls 4

print_key_value_pairFunction · 0.85
to_stringFunction · 0.85
sizeMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected