| 127 | } |
| 128 | |
| 129 | CudaKernelLaunchExCommand::CudaKernelLaunchExCommand(const CUlaunchConfig *cfg, CUfunction func, |
| 130 | void **params, void **extra, bool deep_copy) |
| 131 | : CudaKernelCommand(func, params, extra, deep_copy) |
| 132 | { |
| 133 | if (cfg == nullptr) { |
| 134 | XWARN("CUlaunchConfig of %p is nullptr", func); |
| 135 | return; |
| 136 | } |
| 137 | |
| 138 | memcpy(&cfg_, cfg, sizeof(CUlaunchConfig)); |
| 139 | if (cfg->attrs == nullptr || !deep_copy_) return; |
| 140 | cfg_.attrs = (CUlaunchAttribute *)malloc(cfg->numAttrs * sizeof(CUlaunchAttribute)); |
| 141 | memcpy(cfg_.attrs, cfg->attrs, cfg->numAttrs * sizeof(CUlaunchAttribute)); |
| 142 | } |
| 143 | |
| 144 | CudaKernelLaunchExCommand::~CudaKernelLaunchExCommand() |
| 145 | { |
nothing calls this directly
no outgoing calls
no test coverage detected