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

Method Each

tensorflow/compiler/xla/array.h:312–317  ·  view source on GitHub ↗

Invokes a callback with the (indices, value_ptr) for each cell in the array.

Source from the content-addressed store, hash-verified

310 // Invokes a callback with the (indices, value_ptr) for each cell in the
311 // array.
312 void Each(std::function<void(absl::Span<const int64>, T*)> f) {
313 std::vector<int64> index(sizes_.size());
314 for (int64 i = 0; i < num_elements(); ++i, next_index(&index)) {
315 f(index, &values_[i]);
316 }
317 }
318
319 // Invokes a callback with the (indices, value) for each cell in the array.
320 void Each(std::function<void(absl::Span<const int64>, T)> f) const {

Callers 13

PopulateFromArrayMethod · 0.45
PadArray4DMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TileIndexForDeviceMethod · 0.45
ValidateNonTupleMethod · 0.45
XLA_TEST_FFunction · 0.45
XLA_TEST_PFunction · 0.45
XLA_TEST_FFunction · 0.45
DoItMethod · 0.45

Calls 2

fFunction · 0.50
sizeMethod · 0.45

Tested by 7

TESTFunction · 0.36
TESTFunction · 0.36
XLA_TEST_FFunction · 0.36
XLA_TEST_PFunction · 0.36
XLA_TEST_FFunction · 0.36
DoItMethod · 0.36
XLA_TEST_PFunction · 0.36