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

Function MutableOutputBetween

paddle/phi/core/kernel_context.h:131–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129
130 template <typename TensorType>
131 std::vector<TensorType*> MutableOutputBetween(size_t start, size_t end) {
132 std::vector<TensorType*> v;
133 bool is_empty_vector = true;
134 for (size_t i = start; i < end; ++i) {
135 v.emplace_back(static_cast<TensorType*>(outputs_.at(i)));
136 if (outputs_.at(i) != nullptr) {
137 is_empty_vector = false;
138 }
139 }
140 if (is_empty_vector) {
141 v.clear();
142 }
143 return v;
144 }
145
146 template <typename AttrType>
147 const AttrType& AttrAt(size_t idx) const;

Callers 1

InferMetaContextClass · 0.85

Calls 3

emplace_backMethod · 0.45
atMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected