nvRTC Interfaces.
nvRTC is loaded at runtime via dynamic loading due to explicit cuda_driver linking by cmake.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
procedure(nvrtcGetErrorString_interface), | public, | pointer | :: | nvrtcGetErrorString_c |
Fortran pointer to the nvrtcGetErrorString function |
||
procedure(nvrtcCreateProgram_interface), | public, | pointer | :: | nvrtcCreateProgram |
Fortran pointer to the nvrtcCreateProgram function |
||
procedure(nvrtcDestroyProgram_interface), | public, | pointer | :: | nvrtcDestroyProgram |
Fortran pointer to the nvrtcDestroyProgram function |
||
procedure(nvrtcCompileProgram_interface), | public, | pointer | :: | nvrtcCompileProgram |
Fortran pointer to the nvrtcCompileProgram function |
||
procedure(nvrtcGetProgramLog_interface), | public, | pointer | :: | nvrtcGetProgramLog |
Fortran pointer to the nvrtcGetProgramLog function |
||
procedure(nvrtcGetCUBINSize_interface), | public, | pointer | :: | nvrtcGetCUBINSize |
Fortran pointer to the nvrtcGetCUBINSize function |
||
procedure(nvrtcGetCUBIN_interface), | public, | pointer | :: | nvrtcGetCUBIN |
Fortran pointer to the nvrtcGetCUBIN function |
||
logical, | private, | save | :: | is_loaded | = | .false. |
Flag indicating whether the library is loaded |
type(c_ptr), | private, | save | :: | libnvrtc |
Handle to the loaded library |
||
type(c_funptr), | private, | save | :: | nvrtcFunctions(7) |
Array of pointers to the nvRTC functions |
Helper function that returns a string describing the given nvrtcResult code For unrecognized enumeration values, it returns “NVRTC_ERROR unknown”
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=c_int), | value | :: | error_code |
CUDA Runtime Compilation API result code. |
Pointer to C string
Creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter prog with it.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nvrtcProgram) | :: | prog |
CUDA Runtime Compilation program. |
|||
character(len=c_char) | :: | src(*) |
CUDA program source. |
|||
character(len=c_char) | :: | name(*) |
CUDA program name. |
|||
integer(kind=c_int), | value | :: | numHeaders |
Number of headers used. Must be greater than or equal to 0. |
||
type(c_ptr), | value | :: | headers |
Sources of the headers |
||
type(c_ptr), | value | :: | includeNames |
Name of each header by which they can be included in the CUDA program source |
The enumerated type nvrtcResult defines API call result codes.
Destroys the given program.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nvrtcProgram) | :: | prog |
CUDA Runtime Compilation program. |
The enumerated type nvrtcResult defines API call result codes.
Compiles the given program.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nvrtcProgram), | value | :: | prog |
CUDA Runtime Compilation program. |
||
integer(kind=c_int), | value | :: | numOptions |
Number of compiler options passed. |
||
type(c_ptr) | :: | options(*) |
Compiler options in the form of C string array |
The enumerated type nvrtcResult defines API call result codes.
Stores the log generated by the previous compilation of prog in the memory pointed by log
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nvrtcProgram), | value | :: | prog |
CUDA Runtime Compilation program. |
||
type(c_ptr), | value | :: | log |
Compilation log. |
The enumerated type nvrtcResult defines API call result codes.
Sets the value of cubinSizeRet
with the size of the cubin generated by the previous compilation of prog
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nvrtcProgram), | value | :: | prog |
CUDA Runtime Compilation program. |
||
integer(kind=c_size_t) | :: | cubinSizeRet |
Size of the generated cubin. |
The enumerated type nvrtcResult defines API call result codes.
Stores the cubin generated by the previous compilation of prog
in the memory pointed by cubin
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nvrtcProgram), | value | :: | prog |
CUDA Runtime Compilation program. |
||
character(len=c_char) | :: | cubin(*) |
Compiled and assembled result. |
The enumerated type nvrtcResult defines API call result codes.
nvrtcProgram is the unit of compilation, and an opaque handle for a program.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(c_ptr), | public | :: | cptr |
Actual pointer |
Helper function that returns a string describing the given nvrtcResult code For unrecognized enumeration values, it returns “NVRTC_ERROR unknown”
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=c_int), | intent(in) | :: | error_code |
CUDA Runtime Compilation API result code. |
Result string
Dynamically loads nvRTC library and its functions
Error code