MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / EachCellAsString

Method EachCellAsString

tensorflow/compiler/xla/literal.cc:1107–1118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1105}
1106
1107void LiteralBase::EachCellAsString(
1108 const std::function<void(absl::Span<const int64> indices,
1109 const string& value)>& per_cell) const {
1110 if (ShapeUtil::IsZeroElementArray(shape())) {
1111 return;
1112 }
1113 std::vector<int64> indices = IndexUtil::LinearIndexToMultidimensionalIndex(
1114 shape(), /*linear_index=*/0);
1115 do {
1116 per_cell(indices, GetAsString(indices));
1117 } while (IndexUtil::BumpIndices(shape(), absl::MakeSpan(indices)));
1118}
1119
1120namespace {
1121template <typename NativeSrcT, typename NativeDestT, typename ConverterType>

Callers 2

TEST_FFunction · 0.80
WriteToPathMethod · 0.80

Calls 1

shapeFunction · 0.50

Tested by 1

TEST_FFunction · 0.64