MCPcopy Create free account
hub / github.com/Cambricon/mlu-ops / extend

Method extend

core/tensor.cpp:228–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226 }
227 inline void unlock() { flag.clear(std::memory_order_release); }
228 inline void extend(size_t n) {
229 auto header = malloc(sizeof(mluOpTensorStruct) * n);
230 for (size_t i = 0; i < n; ++i) {
231 queue.push_front((mluOpTensorDescriptor_t)header + i);
232 }
233 headers.push_back(header);
234 }
235 size_t extend_num = 128;
236 std::deque<mluOpTensorDescriptor_t> queue;
237 std::vector<void *> headers;

Calls

no outgoing calls

Tested by

no test coverage detected