| 59 | } |
| 60 | |
| 61 | Status OpRegistry::LookUp(const string& op_type_name, |
| 62 | const OpRegistrationData** op_reg_data) const { |
| 63 | { |
| 64 | tf_shared_lock l(mu_); |
| 65 | if (initialized_) { |
| 66 | if (const OpRegistrationData* res = |
| 67 | gtl::FindWithDefault(registry_, op_type_name, nullptr)) { |
| 68 | *op_reg_data = res; |
| 69 | return Status::OK(); |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | return LookUpSlow(op_type_name, op_reg_data); |
| 74 | } |
| 75 | |
| 76 | Status OpRegistry::LookUpSlow(const string& op_type_name, |
| 77 | const OpRegistrationData** op_reg_data) const { |