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

Method EachCell

tensorflow/compiler/xla/literal.h:912–922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

910
911template <typename NativeT>
912void LiteralBase::EachCell(
913 std::function<void(absl::Span<const int64> indices, NativeT value)>
914 per_cell) const {
915 if (ShapeUtil::IsZeroElementArray(shape())) {
916 return;
917 }
918 std::vector<int64> indices(shape().rank(), 0);
919 do {
920 per_cell(indices, Get<NativeT>(indices));
921 } while (IndexUtil::BumpIndices(shape(), absl::MakeSpan(indices)));
922}
923
924template <typename NativeT>
925inline void MutableLiteralBase::PopulateR1(absl::Span<const NativeT> values) {

Callers

nothing calls this directly

Calls 2

shapeFunction · 0.50
rankMethod · 0.45

Tested by

no test coverage detected