Package org.bytedeco.cuda.global
Class nvrtc
- java.lang.Object
-
- org.bytedeco.cuda.presets.nvrtc
-
- org.bytedeco.cuda.global.nvrtc
-
- All Implemented Interfaces:
InfoMapper
public class nvrtc extends nvrtc
-
-
Field Summary
Fields Modifier and Type Field Description static intNVRTC_ERROR_BUILTIN_OPERATION_FAILUREenum nvrtcResultstatic intNVRTC_ERROR_COMPILATIONenum nvrtcResultstatic intNVRTC_ERROR_INTERNAL_ERRORenum nvrtcResultstatic intNVRTC_ERROR_INVALID_INPUTenum nvrtcResultstatic intNVRTC_ERROR_INVALID_OPTIONenum nvrtcResultstatic intNVRTC_ERROR_INVALID_PROGRAMenum nvrtcResultstatic intNVRTC_ERROR_NAME_EXPRESSION_NOT_VALIDenum nvrtcResultstatic intNVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATIONenum nvrtcResultstatic intNVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATIONenum nvrtcResultstatic intNVRTC_ERROR_OUT_OF_MEMORYenum nvrtcResultstatic intNVRTC_ERROR_PROGRAM_CREATION_FAILUREenum nvrtcResultstatic intNVRTC_SUCCESSenum nvrtcResult
-
Constructor Summary
Constructors Constructor Description nvrtc()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnvrtcAddNameExpression(_nvrtcProgram prog, String name_expression)static intnvrtcAddNameExpression(_nvrtcProgram prog, BytePointer name_expression)\ingroup compilation \brief nvrtcAddNameExpression notes the given name expression denoting the address of a __global__ function or __device__/__constant__ variable.static intnvrtcCompileProgram(_nvrtcProgram prog, int numOptions, byte[] options)static intnvrtcCompileProgram(_nvrtcProgram prog, int numOptions, ByteBuffer options)static intnvrtcCompileProgram(_nvrtcProgram prog, int numOptions, BytePointer options)static intnvrtcCompileProgram(_nvrtcProgram prog, int numOptions, PointerPointer options)\ingroup compilation \brief nvrtcCompileProgram compiles the given program.static intnvrtcCreateProgram(_nvrtcProgram prog, BytePointer src, BytePointer name, int numHeaders, byte[] headers, byte[] includeNames)static intnvrtcCreateProgram(_nvrtcProgram prog, BytePointer src, BytePointer name, int numHeaders, ByteBuffer headers, ByteBuffer includeNames)static intnvrtcCreateProgram(_nvrtcProgram prog, BytePointer src, BytePointer name, int numHeaders, BytePointer headers, BytePointer includeNames)static intnvrtcCreateProgram(_nvrtcProgram prog, BytePointer src, BytePointer name, int numHeaders, PointerPointer headers, PointerPointer includeNames)\ingroup compilation \brief nvrtcCreateProgram creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter \p prog with it.static intnvrtcCreateProgram(PointerPointer prog, String src, String name, int numHeaders, byte[] headers, byte[] includeNames)static intnvrtcCreateProgram(PointerPointer prog, String src, String name, int numHeaders, ByteBuffer headers, ByteBuffer includeNames)static intnvrtcCreateProgram(PointerPointer prog, String src, String name, int numHeaders, BytePointer headers, BytePointer includeNames)static intnvrtcDestroyProgram(_nvrtcProgram prog)\ingroup compilation \brief nvrtcDestroyProgram destroys the given program.static intnvrtcDestroyProgram(PointerPointer prog)static BytePointernvrtcGetErrorString(int result)\ingroup error \brief nvrtcGetErrorString is a helper function that returns a string describing the given nvrtcResult code, e.g., NVRTC_SUCCESS to \c "NVRTC_SUCCESS".static intnvrtcGetLoweredName(_nvrtcProgram prog, String name_expression, byte[] lowered_name)static intnvrtcGetLoweredName(_nvrtcProgram prog, String name_expression, ByteBuffer lowered_name)static intnvrtcGetLoweredName(_nvrtcProgram prog, String name_expression, BytePointer lowered_name)static intnvrtcGetLoweredName(_nvrtcProgram prog, BytePointer name_expression, byte[] lowered_name)static intnvrtcGetLoweredName(_nvrtcProgram prog, BytePointer name_expression, ByteBuffer lowered_name)static intnvrtcGetLoweredName(_nvrtcProgram prog, BytePointer name_expression, BytePointer lowered_name)static intnvrtcGetLoweredName(_nvrtcProgram prog, BytePointer name_expression, PointerPointer lowered_name)\ingroup compilation \brief nvrtcGetLoweredName extracts the lowered (mangled) name for a __global__ function or __device__/__constant__ variable, and updates *lowered_name to point to it.static intnvrtcGetProgramLog(_nvrtcProgram prog, byte[] log)static intnvrtcGetProgramLog(_nvrtcProgram prog, ByteBuffer log)static intnvrtcGetProgramLog(_nvrtcProgram prog, BytePointer log)\ingroup compilation \brief nvrtcGetProgramLog stores the log generated by the previous compilation of \p prog in the memory pointed by \p log.static intnvrtcGetProgramLogSize(_nvrtcProgram prog, SizeTPointer logSizeRet)\ingroup compilation \brief nvrtcGetProgramLogSize sets \p logSizeRet with the size of the log generated by the previous compilation of \p prog (including the trailing \c NULL).static intnvrtcGetPTX(_nvrtcProgram prog, byte[] ptx)static intnvrtcGetPTX(_nvrtcProgram prog, ByteBuffer ptx)static intnvrtcGetPTX(_nvrtcProgram prog, BytePointer ptx)\ingroup compilation \brief nvrtcGetPTX stores the PTX generated by the previous compilation of \p prog in the memory pointed by \p ptx.static intnvrtcGetPTXSize(_nvrtcProgram prog, SizeTPointer ptxSizeRet)\ingroup compilation \brief nvrtcGetPTXSize sets \p ptxSizeRet with the size of the PTX generated by the previous compilation of \p prog (including the trailing \c NULL).static intnvrtcVersion(int[] major, int[] minor)static intnvrtcVersion(IntBuffer major, IntBuffer minor)static intnvrtcVersion(IntPointer major, IntPointer minor)\ingroup query \brief nvrtcVersion sets the output parameters \p major and \p minor with the CUDA Runtime Compilation version number.
-
-
-
Field Detail
-
NVRTC_SUCCESS
public static final int NVRTC_SUCCESS
enum nvrtcResult- See Also:
- Constant Field Values
-
NVRTC_ERROR_OUT_OF_MEMORY
public static final int NVRTC_ERROR_OUT_OF_MEMORY
enum nvrtcResult- See Also:
- Constant Field Values
-
NVRTC_ERROR_PROGRAM_CREATION_FAILURE
public static final int NVRTC_ERROR_PROGRAM_CREATION_FAILURE
enum nvrtcResult- See Also:
- Constant Field Values
-
NVRTC_ERROR_INVALID_INPUT
public static final int NVRTC_ERROR_INVALID_INPUT
enum nvrtcResult- See Also:
- Constant Field Values
-
NVRTC_ERROR_INVALID_PROGRAM
public static final int NVRTC_ERROR_INVALID_PROGRAM
enum nvrtcResult- See Also:
- Constant Field Values
-
NVRTC_ERROR_INVALID_OPTION
public static final int NVRTC_ERROR_INVALID_OPTION
enum nvrtcResult- See Also:
- Constant Field Values
-
NVRTC_ERROR_COMPILATION
public static final int NVRTC_ERROR_COMPILATION
enum nvrtcResult- See Also:
- Constant Field Values
-
NVRTC_ERROR_BUILTIN_OPERATION_FAILURE
public static final int NVRTC_ERROR_BUILTIN_OPERATION_FAILURE
enum nvrtcResult- See Also:
- Constant Field Values
-
NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION
public static final int NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION
enum nvrtcResult- See Also:
- Constant Field Values
-
NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION
public static final int NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION
enum nvrtcResult- See Also:
- Constant Field Values
-
NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID
public static final int NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID
enum nvrtcResult- See Also:
- Constant Field Values
-
NVRTC_ERROR_INTERNAL_ERROR
public static final int NVRTC_ERROR_INTERNAL_ERROR
enum nvrtcResult- See Also:
- Constant Field Values
-
-
Method Detail
-
nvrtcGetErrorString
@Cast("const char*") public static BytePointer nvrtcGetErrorString(@Cast("nvrtcResult") int result)
\ingroup error \brief nvrtcGetErrorString is a helper function that returns a string describing the given nvrtcResult code, e.g., NVRTC_SUCCESS to \c "NVRTC_SUCCESS". For unrecognized enumeration values, it returns \c "NVRTC_ERROR unknown".- Parameters:
result- [in] CUDA Runtime Compilation API result code.- Returns:
- Message string for the given #nvrtcResult code.
-
nvrtcVersion
@Cast("nvrtcResult") public static int nvrtcVersion(IntPointer major, IntPointer minor)
\ingroup query \brief nvrtcVersion sets the output parameters \p major and \p minor with the CUDA Runtime Compilation version number.- Parameters:
major- [out] CUDA Runtime Compilation major version number.minor- [out] CUDA Runtime Compilation minor version number.- Returns:
- - \link #nvrtcResult NVRTC_SUCCESS \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
-
nvrtcVersion
@Cast("nvrtcResult") public static int nvrtcVersion(int[] major, int[] minor)
-
nvrtcCreateProgram
@Cast("nvrtcResult") public static int nvrtcCreateProgram(@ByPtrPtr _nvrtcProgram prog, @Cast("const char*") BytePointer src, @Cast("const char*") BytePointer name, int numHeaders, @Cast("const char*const*") PointerPointer headers, @Cast("const char*const*") PointerPointer includeNames)
\ingroup compilation \brief nvrtcCreateProgram creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter \p prog with it.- Parameters:
prog- [out] CUDA Runtime Compilation program.src- [in] CUDA program source.name- [in] CUDA program name.\n \p name can be \c NULL; \c "default_program" is used when \p name is \c NULL.numHeaders- [in] Number of headers used.\n \p numHeaders must be greater than or equal to 0.headers- [in] Sources of the headers.\n \p headers can be \c NULL when \p numHeaders is 0.includeNames- [in] Name of each header by which they can be included in the CUDA program source.\n \p includeNames can be \c NULL when \p numHeaders is 0.- Returns:
- - \link #nvrtcResult NVRTC_SUCCESS \endlink - \link #nvrtcResult NVRTC_ERROR_OUT_OF_MEMORY \endlink - \link #nvrtcResult NVRTC_ERROR_PROGRAM_CREATION_FAILURE \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
-
nvrtcCreateProgram
@Cast("nvrtcResult") public static int nvrtcCreateProgram(@ByPtrPtr _nvrtcProgram prog, @Cast("const char*") BytePointer src, @Cast("const char*") BytePointer name, int numHeaders, @Cast("const char*const*") @ByPtrPtr BytePointer headers, @Cast("const char*const*") @ByPtrPtr BytePointer includeNames)
-
nvrtcCreateProgram
@Cast("nvrtcResult") public static int nvrtcCreateProgram(@Cast("_nvrtcProgram**") PointerPointer prog, String src, String name, int numHeaders, @Cast("const char*const*") @ByPtrPtr ByteBuffer headers, @Cast("const char*const*") @ByPtrPtr ByteBuffer includeNames)
-
nvrtcCreateProgram
@Cast("nvrtcResult") public static int nvrtcCreateProgram(@ByPtrPtr _nvrtcProgram prog, @Cast("const char*") BytePointer src, @Cast("const char*") BytePointer name, int numHeaders, @Cast("const char*const*") @ByPtrPtr byte[] headers, @Cast("const char*const*") @ByPtrPtr byte[] includeNames)
-
nvrtcCreateProgram
@Cast("nvrtcResult") public static int nvrtcCreateProgram(@Cast("_nvrtcProgram**") PointerPointer prog, String src, String name, int numHeaders, @Cast("const char*const*") @ByPtrPtr BytePointer headers, @Cast("const char*const*") @ByPtrPtr BytePointer includeNames)
-
nvrtcCreateProgram
@Cast("nvrtcResult") public static int nvrtcCreateProgram(@ByPtrPtr _nvrtcProgram prog, @Cast("const char*") BytePointer src, @Cast("const char*") BytePointer name, int numHeaders, @Cast("const char*const*") @ByPtrPtr ByteBuffer headers, @Cast("const char*const*") @ByPtrPtr ByteBuffer includeNames)
-
nvrtcCreateProgram
@Cast("nvrtcResult") public static int nvrtcCreateProgram(@Cast("_nvrtcProgram**") PointerPointer prog, String src, String name, int numHeaders, @Cast("const char*const*") @ByPtrPtr byte[] headers, @Cast("const char*const*") @ByPtrPtr byte[] includeNames)
-
nvrtcDestroyProgram
@Cast("nvrtcResult") public static int nvrtcDestroyProgram(@ByPtrPtr _nvrtcProgram prog)
\ingroup compilation \brief nvrtcDestroyProgram destroys the given program.- Parameters:
prog- [in] CUDA Runtime Compilation program.- Returns:
- - \link #nvrtcResult NVRTC_SUCCESS \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
-
nvrtcDestroyProgram
@Cast("nvrtcResult") public static int nvrtcDestroyProgram(@Cast("_nvrtcProgram**") PointerPointer prog)
-
nvrtcCompileProgram
@Cast("nvrtcResult") public static int nvrtcCompileProgram(_nvrtcProgram prog, int numOptions, @Cast("const char*const*") PointerPointer options)
\ingroup compilation \brief nvrtcCompileProgram compiles the given program. It supports compile options listed in \ref options.
-
nvrtcCompileProgram
@Cast("nvrtcResult") public static int nvrtcCompileProgram(_nvrtcProgram prog, int numOptions, @Cast("const char*const*") @ByPtrPtr BytePointer options)
-
nvrtcCompileProgram
@Cast("nvrtcResult") public static int nvrtcCompileProgram(_nvrtcProgram prog, int numOptions, @Cast("const char*const*") @ByPtrPtr ByteBuffer options)
-
nvrtcCompileProgram
@Cast("nvrtcResult") public static int nvrtcCompileProgram(_nvrtcProgram prog, int numOptions, @Cast("const char*const*") @ByPtrPtr byte[] options)
-
nvrtcGetPTXSize
@Cast("nvrtcResult") public static int nvrtcGetPTXSize(_nvrtcProgram prog, @Cast("size_t*") SizeTPointer ptxSizeRet)
\ingroup compilation \brief nvrtcGetPTXSize sets \p ptxSizeRet with the size of the PTX generated by the previous compilation of \p prog (including the trailing \c NULL).- Parameters:
prog- [in] CUDA Runtime Compilation program.ptxSizeRet- [out] Size of the generated PTX (including the trailing \c NULL).- Returns:
- - \link #nvrtcResult NVRTC_SUCCESS \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
-
nvrtcGetPTX
@Cast("nvrtcResult") public static int nvrtcGetPTX(_nvrtcProgram prog, @Cast("char*") BytePointer ptx)
\ingroup compilation \brief nvrtcGetPTX stores the PTX generated by the previous compilation of \p prog in the memory pointed by \p ptx.- Parameters:
prog- [in] CUDA Runtime Compilation program.ptx- [out] Compiled result.- Returns:
- - \link #nvrtcResult NVRTC_SUCCESS \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
-
nvrtcGetPTX
@Cast("nvrtcResult") public static int nvrtcGetPTX(_nvrtcProgram prog, @Cast("char*") ByteBuffer ptx)
-
nvrtcGetPTX
@Cast("nvrtcResult") public static int nvrtcGetPTX(_nvrtcProgram prog, @Cast("char*") byte[] ptx)
-
nvrtcGetProgramLogSize
@Cast("nvrtcResult") public static int nvrtcGetProgramLogSize(_nvrtcProgram prog, @Cast("size_t*") SizeTPointer logSizeRet)
\ingroup compilation \brief nvrtcGetProgramLogSize sets \p logSizeRet with the size of the log generated by the previous compilation of \p prog (including the trailing \c NULL). Note that compilation log may be generated with warnings and informative messages, even when the compilation of \p prog succeeds.- Parameters:
prog- [in] CUDA Runtime Compilation program.logSizeRet- [out] Size of the compilation log (including the trailing \c NULL).- Returns:
- - \link #nvrtcResult NVRTC_SUCCESS \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
-
nvrtcGetProgramLog
@Cast("nvrtcResult") public static int nvrtcGetProgramLog(_nvrtcProgram prog, @Cast("char*") BytePointer log)
\ingroup compilation \brief nvrtcGetProgramLog stores the log generated by the previous compilation of \p prog in the memory pointed by \p log.- Parameters:
prog- [in] CUDA Runtime Compilation program.log- [out] Compilation log.- Returns:
- - \link #nvrtcResult NVRTC_SUCCESS \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
-
nvrtcGetProgramLog
@Cast("nvrtcResult") public static int nvrtcGetProgramLog(_nvrtcProgram prog, @Cast("char*") ByteBuffer log)
-
nvrtcGetProgramLog
@Cast("nvrtcResult") public static int nvrtcGetProgramLog(_nvrtcProgram prog, @Cast("char*") byte[] log)
-
nvrtcAddNameExpression
@Cast("nvrtcResult") public static int nvrtcAddNameExpression(_nvrtcProgram prog, @Cast("const char*") BytePointer name_expression)
\ingroup compilation \brief nvrtcAddNameExpression notes the given name expression denoting the address of a __global__ function or __device__/__constant__ variable. The identical name expression string must be provided on a subsequent call to nvrtcGetLoweredName to extract the lowered name.- Parameters:
prog- [in] CUDA Runtime Compilation program.name_expression- [in] constant expression denoting the address of a __global__ function or __device__/__constant__ variable.- Returns:
- - \link #nvrtcResult NVRTC_SUCCESS \endlink - \link #nvrtcResult NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION \endlink
-
nvrtcAddNameExpression
@Cast("nvrtcResult") public static int nvrtcAddNameExpression(_nvrtcProgram prog, String name_expression)
-
nvrtcGetLoweredName
@Cast("nvrtcResult") public static int nvrtcGetLoweredName(_nvrtcProgram prog, @Cast("const char*") BytePointer name_expression, @Cast("const char**") PointerPointer lowered_name)
\ingroup compilation \brief nvrtcGetLoweredName extracts the lowered (mangled) name for a __global__ function or __device__/__constant__ variable, and updates *lowered_name to point to it. The memory containing the name is released when the NVRTC program is destroyed by nvrtcDestroyProgram. The identical name expression must have been previously provided to nvrtcAddNameExpression.- Parameters:
prog- [in] CUDA Runtime Compilation program.name_expression- [in] constant expression denoting the address of a __global__ function or __device__/__constant__ variable.lowered_name- [out] initialized by the function to point to a C string containing the lowered (mangled) name corresponding to the provided name expression.- Returns:
- - \link #nvrtcResult NVRTC_SUCCESS \endlink - \link #nvrtcResult NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION \endlink - \link #nvrtcResult NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID \endlink
-
nvrtcGetLoweredName
@Cast("nvrtcResult") public static int nvrtcGetLoweredName(_nvrtcProgram prog, @Cast("const char*") BytePointer name_expression, @Cast("const char**") @ByPtrPtr BytePointer lowered_name)
-
nvrtcGetLoweredName
@Cast("nvrtcResult") public static int nvrtcGetLoweredName(_nvrtcProgram prog, String name_expression, @Cast("const char**") @ByPtrPtr ByteBuffer lowered_name)
-
nvrtcGetLoweredName
@Cast("nvrtcResult") public static int nvrtcGetLoweredName(_nvrtcProgram prog, @Cast("const char*") BytePointer name_expression, @Cast("const char**") @ByPtrPtr byte[] lowered_name)
-
nvrtcGetLoweredName
@Cast("nvrtcResult") public static int nvrtcGetLoweredName(_nvrtcProgram prog, String name_expression, @Cast("const char**") @ByPtrPtr BytePointer lowered_name)
-
nvrtcGetLoweredName
@Cast("nvrtcResult") public static int nvrtcGetLoweredName(_nvrtcProgram prog, @Cast("const char*") BytePointer name_expression, @Cast("const char**") @ByPtrPtr ByteBuffer lowered_name)
-
nvrtcGetLoweredName
@Cast("nvrtcResult") public static int nvrtcGetLoweredName(_nvrtcProgram prog, String name_expression, @Cast("const char**") @ByPtrPtr byte[] lowered_name)
-
-