MCPcopy Create free account
hub / github.com/XpuOS/xsched / CudaKernelLaunchExCommand

Method CudaKernelLaunchExCommand

platforms/cuda/hal/src/common/cuda_command.cpp:129–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129CudaKernelLaunchExCommand::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
144CudaKernelLaunchExCommand::~CudaKernelLaunchExCommand()
145{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected