Description Usage Arguments Value Author(s) References See Also Examples
This function converts code in LLVM's IR format to PTX using libNVVM. The function can read the IR code from a file or have it be passed directly as content.
1 2 3 4 5 6 7 8 | generatePTX(irCode,
name = if(isFile)
irCode
else
as.character(Sys.time()),
options = character(),
prog = createProgram(),
isFile = !is(irCode, "AsIs") && (length(irCode) == 1 && file.exists(irCode)))
|
irCode |
the name of the file containing the IR code or a
character vector containing the IR code itself.
If this is the code itself, we can indicate this via the |
name |
the name of the module/program |
options |
a character vector of options passed to
|
prog |
a |
isFile |
a logical value that allows the caller to explicitly
indicate whether the value of |
A string (character vector with one element) containing the PTX code.
This has a class named PTXCode
.
Duncan Temple Lang
libNVVM documentation
1 2 3 | f = system.file("sampleCode", "simple-gpu64.ll", package = "Rnvvm")
ptx = generatePTX(f, isFile = TRUE)
cat(ptx)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.