MCPcopy Create free account
hub / github.com/NVIDIA/cuda-quantum / toOpaqueArgs

Method toOpaqueArgs

python/runtime/cudaq/platform/py_alt_launch_kernel.cpp:646–657  ·  view source on GitHub ↗

@brief Create a new OpaqueArguments pointer and pack the python arguments in it. Clients must delete the memory.

Source from the content-addressed store, hash-verified

644/// @brief Create a new OpaqueArguments pointer and pack the python arguments
645/// in it. Clients must delete the memory.
646cudaq::OpaqueArguments *cudaq::toOpaqueArgs(nanobind::args &args,
647 MlirModule mod,
648 const std::string &name) {
649 auto kernelFunc = getKernelFuncOp(mod, name);
650 auto *argData = new cudaq::OpaqueArguments();
651 args = simplifiedValidateInputArguments(args);
652 setDataLayout(mod);
653 cudaq::packArgs(
654 *argData, args, kernelFunc,
655 [](OpaqueArguments &, nanobind::object &, unsigned) { return false; });
656 return argData;
657}
658
659/// Append result buffer to \p runtimeArgs.
660/// The result buffer is a pointer to a preallocated heap location in which the

Callers

nothing calls this directly

Calls 1

getKernelFuncOpFunction · 0.85

Tested by

no test coverage detected