| 45 | } |
| 46 | |
| 47 | exec_handle_t GenericEngine::AddGraphExecutor(GraphExecutor* graph_executor) |
| 48 | { |
| 49 | GraphTask* graph_task = new GraphTask(graph_executor); |
| 50 | |
| 51 | graph_task->SetEngine(this); |
| 52 | |
| 53 | Lock(); |
| 54 | |
| 55 | graph_map_[graph_executor] = graph_task; |
| 56 | |
| 57 | Unlock(); |
| 58 | |
| 59 | any* ret = new any(); |
| 60 | |
| 61 | (*ret) = graph_task; |
| 62 | |
| 63 | return ret; |
| 64 | } |
| 65 | |
| 66 | void* GenericEngine::GetTensorBuffer(Tensor* tensor, exec_handle_t h) |
| 67 | { |