| 193 | } |
| 194 | |
| 195 | void compute_node_optimized(GraphNode& node, const nodes_vector& nodes, const node_index_map_t& node_index_map) { |
| 196 | if (node.op_type == OpType::INPUT) return; |
| 197 | |
| 198 | auto it = dispatch_table.find(node.op_type); |
| 199 | if (it != dispatch_table.end()) { |
| 200 | it->second(node, nodes, node_index_map); |
| 201 | } else { |
| 202 | throw std::runtime_error("Unknown operation type: " + std::to_string(static_cast<int>(node.op_type))); |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | void CactusGraph::set_input(size_t node_id, const void* data, Precision) { |
| 207 | auto it = node_index_map_.find(node_id); |