|
const char * | hiprtcGetErrorString (hiprtcResult result) |
| Returns text string message to explain the error which occurred.
|
|
hiprtcResult | hiprtcVersion (int *major, int *minor) |
| Sets the parameters as major and minor version.
|
|
hiprtcResult | hiprtcAddNameExpression (hiprtcProgram prog, const char *name_expression) |
| Adds the given name exprssion to the runtime compilation program.
|
|
hiprtcResult | hiprtcCompileProgram (hiprtcProgram prog, int numOptions, const char **options) |
| Compiles the given runtime compilation program.
|
|
hiprtcResult | hiprtcCreateProgram (hiprtcProgram *prog, const char *src, const char *name, int numHeaders, const char **headers, const char **includeNames) |
| Creates an instance of hiprtcProgram with the given input parameters, and sets the output hiprtcProgram prog with it.
|
|
hiprtcResult | hiprtcDestroyProgram (hiprtcProgram *prog) |
| Destroys an instance of given hiprtcProgram.
|
|
hiprtcResult | hiprtcGetLoweredName (hiprtcProgram prog, const char *name_expression, const char **lowered_name) |
| Gets the lowered (mangled) name from an instance of hiprtcProgram with the given input parameters, and sets the output lowered_name with it.
|
|
hiprtcResult | hiprtcGetProgramLog (hiprtcProgram prog, char *log) |
| Gets the log generated by the runtime compilation program instance.
|
|
hiprtcResult | hiprtcGetProgramLogSize (hiprtcProgram prog, size_t *logSizeRet) |
| Gets the size of log generated by the runtime compilation program instance.
|
|
hiprtcResult | hiprtcGetCode (hiprtcProgram prog, char *code) |
| Gets the pointer of compilation binary by the runtime compilation program instance.
|
|
hiprtcResult | hiprtcGetCodeSize (hiprtcProgram prog, size_t *codeSizeRet) |
| Gets the size of compilation binary by the runtime compilation program instance.
|
|
This section describes the runtime compilation functions of HIP runtime API.
hiprtcResult hiprtcCreateProgram |
( |
hiprtcProgram * |
prog, |
|
|
const char * |
src, |
|
|
const char * |
name, |
|
|
int |
numHeaders, |
|
|
const char ** |
headers, |
|
|
const char ** |
includeNames |
|
) |
| |
Creates an instance of hiprtcProgram with the given input parameters, and sets the output hiprtcProgram prog with it.
- Parameters
-
[in,out] | prog | runtime compilation program instance. |
[in] | src | const char pointer to the program source. |
[in] | name | const char pointer to the program name. |
[in] | numHeaders | number of headers. |
[in] | headers | array of strings pointing to headers. |
[in] | includeNames | array of strings pointing to names included in program source. |
- Returns
- HIPRTC_SUCCESS
Any invalide input parameter, it will return HIPRTC_ERROR_INVALID_INPUT or HIPRTC_ERROR_INVALID_PROGRAM.
If failed to create the program, it will return HIPRTC_ERROR_PROGRAM_CREATION_FAILURE.
- See also
- hiprtcResult
hiprtcResult hiprtcGetLoweredName |
( |
hiprtcProgram |
prog, |
|
|
const char * |
name_expression, |
|
|
const char ** |
lowered_name |
|
) |
| |
Gets the lowered (mangled) name from an instance of hiprtcProgram with the given input parameters, and sets the output lowered_name with it.
- Parameters
-
[in] | prog | runtime compilation program instance. |
[in] | name_expression | const char pointer to the name expression. |
[in,out] | lowered_name | const char array to the lowered (mangled) name. |
- Returns
- HIPRTC_SUCCESS
If any invalide nullptr input parameters, it will return HIPRTC_ERROR_INVALID_INPUT
If name_expression is not found, it will return HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID
If failed to get lowered_name from the program, it will return HIPRTC_ERROR_COMPILATION.
- See also
- hiprtcResult