MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / KernelArgsDef

Class KernelArgsDef

paddle/phi/capi/include/wrapper_base.h:489–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487};
488
489class KernelArgsDef : WrapperBase<PD_KernelArgsDef> {
490 public:
491 explicit KernelArgsDef(PD_KernelArgsDef* kernel_args_def)
492 : WrapperBase<PD_KernelArgsDef>(kernel_args_def) {}
493
494 std::vector<TensorArgDef> input_defs() {
495 C_Status status;
496 auto list = PD_KernelArgsDefGetInputArgDefs(raw_data(), &status);
497 PD_CHECK_STATUS(status);
498 auto ptr = reinterpret_cast<PD_TensorArgDef**>(list.data);
499 std::vector<TensorArgDef> ret;
500 for (size_t i = 0; i < list.size; ++i) {
501 ret.emplace_back(ptr[i]);
502 }
503 PD_DeletePointerList(list);
504 return ret;
505 }
506
507 std::vector<TensorArgDef> output_defs() {
508 C_Status status;
509 auto list = PD_KernelArgsDefGetOutputArgDefs(raw_data(), &status);
510 PD_CHECK_STATUS(status);
511 auto ptr = reinterpret_cast<PD_TensorArgDef**>(list.data);
512 std::vector<TensorArgDef> ret;
513 for (size_t i = 0; i < list.size; ++i) {
514 ret.emplace_back(ptr[i]);
515 }
516 PD_DeletePointerList(list);
517 return ret;
518 }
519};
520
521class KernelKey : WrapperBase<PD_KernelKey> {
522 public:

Callers 1

args_defMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected