Skip to main content

nvvmLazyAddModuleToProgram

Function nvvmLazyAddModuleToProgram 

Source
pub unsafe extern "C" fn nvvmLazyAddModuleToProgram(
    prog: nvvmProgram,
    buffer: *const c_char,
    size: size_t,
    name: *const c_char,
) -> nvvmResult
Expand description

Add a module level NVVM IR to a program.

The buffer should contain an NVVM IR module. The module should have NVVM IR in the LLVM 7.0.1 bitcode representation.

A module added using this API is lazily loaded - the only symbols loaded are those that are required by module(s) loaded using nvvmAddModuleToProgram. It is an error for a program to have all modules loaded using this API. Compiler may also optimize entities in this module by making them internal to the linked NVVM IR module, making them eligible for other optimizations. Due to these optimizations, this API to load a module is more efficient and should be used where possible.

§Parameters

  • prog: NVVM program.
  • buffer: NVVM IR module in the bitcode representation.
  • size: Size of the NVVM IR module.
  • name: Name of the NVVM IR module. If NULL, “<unnamed>” is used as the name.

§Return value