29 HIPRTC_ERROR_OUT_OF_MEMORY = 1,
30 HIPRTC_ERROR_PROGRAM_CREATION_FAILURE = 2,
31 HIPRTC_ERROR_INVALID_INPUT = 3,
32 HIPRTC_ERROR_INVALID_PROGRAM = 4,
33 HIPRTC_ERROR_INVALID_OPTION = 5,
34 HIPRTC_ERROR_COMPILATION = 6,
35 HIPRTC_ERROR_BUILTIN_OPERATION_FAILURE = 7,
36 HIPRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = 8,
37 HIPRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = 9,
38 HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10,
39 HIPRTC_ERROR_INTERNAL_ERROR = 11
42 const char* hiprtcGetErrorString(hiprtcResult result);
45 hiprtcResult hiprtcVersion(
int* major,
int* minor) noexcept
47 if (!major || !minor)
return HIPRTC_ERROR_INVALID_INPUT;
53 return HIPRTC_SUCCESS;
60 const char* name_expression);
62 hiprtcResult hiprtcCompileProgram(
hiprtcProgram prog,
int numOptions,
63 const char** options);
65 hiprtcResult hiprtcCreateProgram(
hiprtcProgram* prog,
const char* src,
66 const char* name,
int numHeaders,
68 const char** includeNames);
73 const char* name_expression,
74 const char** lowered_name);
76 hiprtcResult hiprtcGetProgramLog(
hiprtcProgram prog,
char* log);
79 std::size_t* logSizeRet);
83 hiprtcResult hiprtcGetCodeSize(
hiprtcProgram prog, std::size_t* codeSizeRet);
87 std::string demangle(
const char* mangled_expression);
90 #if defined(HIPRTC_GET_TYPE_NAME) 97 hiprtcResult hiprtcGetTypeName(std::string*) =
delete;
101 hiprtcResult hiprtcGetTypeName(std::string* result)
103 if (!result)
return HIPRTC_ERROR_INVALID_INPUT;
105 *result = hip_impl::demangle(
typeid(T).name());
107 return (result->empty()) ? HIPRTC_ERROR_INTERNAL_ERROR :
Definition: hiprtc.cpp:108