MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / has_allocation

Method has_allocation

paddle/phi/core/tensor_array.cc:26–37  ·  view source on GitHub ↗

\brief Test whether the holder is created. \return Whether the holder is created.

Source from the content-addressed store, hash-verified

24/// \brief Test whether the holder is created.
25/// \return Whether the holder is created.
26bool TensorArray::has_allocation() const {
27 if (tensors_.empty()) {
28 return false;
29 }
30
31 for (auto const& tensor : tensors_) {
32 if (!tensor.has_allocation()) {
33 return false;
34 }
35 }
36 return true;
37}
38
39/// \brief Test whether the tensor's storage in TensorArray is allocated.
40/// return Whether all tensors in TensorArray is allocated.

Callers 6

AllocMethod · 0.45
HostAllocMethod · 0.45
has_allocationFunction · 0.45
has_allocationFunction · 0.45
GetMethod · 0.45
initializedMethod · 0.45

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected