| 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; |
no outgoing calls
no test coverage detected