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

Method jitCode

runtime/cudaq/builder/kernel_builder.h:981–994  ·  view source on GitHub ↗

@brief Lower the Quake code to the LLVM Dialect, call `PassManager`.

Source from the content-addressed store, hash-verified

979
980 /// @brief Lower the Quake code to the LLVM Dialect, call `PassManager`.
981 void jitCode(std::vector<std::string> extraLibPaths = {}) override {
982 auto [wasChanged, ptr] =
983 detail::jitCode(*opBuilder, jitEngine.get(), jitEngineToModuleHash,
984 kernelName, extraLibPaths, stateVectorStorage);
985 // If we had a jitEngine, but the code changed, delete the one we had.
986 if (jitEngine && wasChanged)
987 detail::deleteJitEngine(jitEngine.release());
988
989 // Store for the next time if we haven't already
990 if (!jitEngine)
991 jitEngine = std::unique_ptr<mlir::ExecutionEngine,
992 void (*)(mlir::ExecutionEngine *)>(
993 ptr, detail::deleteJitEngine);
994 }
995
996 /// @brief Invoke JIT compilation and extract a function pointer and execute.
997 void jitAndInvoke(void **argsArray,

Callers 3

getKernelNameFunction · 0.80
sampleFunction · 0.80
sample_asyncFunction · 0.80

Calls 4

jitCodeFunction · 0.85
deleteJitEngineFunction · 0.85
releaseMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected