| 427 | } |
| 428 | |
| 429 | std::vector<int> ResourcesVector(OpKernelConstruction* ctx) { |
| 430 | DataTypeVector constant_types; |
| 431 | OP_REQUIRES_OK_RETURN(ctx, std::vector<int>(), |
| 432 | ctx->GetAttr("Tconstants", &constant_types)); |
| 433 | |
| 434 | DataTypeVector arg_types; |
| 435 | OP_REQUIRES_OK_RETURN(ctx, std::vector<int>(), |
| 436 | ctx->GetAttr("Targs", &arg_types)); |
| 437 | |
| 438 | int num_resources; |
| 439 | OP_REQUIRES_OK_RETURN(ctx, std::vector<int>(), |
| 440 | ctx->GetAttr("Nresources", &num_resources)); |
| 441 | |
| 442 | std::vector<int> resources(num_resources); |
| 443 | std::iota(resources.begin(), resources.end(), |
| 444 | constant_types.size() + arg_types.size()); |
| 445 | return resources; |
| 446 | } |
| 447 | |
| 448 | NameAttrList FunctionAttr(OpKernelConstruction* ctx) { |
| 449 | const NameAttrList* func; |
no test coverage detected