Add example apps to compliment docs

Co-authored-by: Nick Curtis <nicholas.curtis@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>


[ROCm/rocprofiler-compute commit: 54f0fa8c81]
Этот коммит содержится в:
colramos-amd
2024-01-31 16:17:43 -06:00
коммит произвёл Cole Ramos
родитель 3b0dce88ca
Коммит 265c0f4856
9 изменённых файлов: 926 добавлений и 0 удалений
+17
Просмотреть файл
@@ -0,0 +1,17 @@
#pragma once
#include <hip/hip_runtime.h>
#include <iostream>
#define hipCheck(stmt) \
do { \
hipError_t err = stmt; \
if (err != hipSuccess) { \
char msg[256]; \
sprintf(msg, "%s in file %s, function %s, line %d\n", #stmt, __FILE__, \
__FUNCTION__, __LINE__); \
std::string errstring = hipGetErrorString(err); \
std::cerr << msg << "\t" << errstring << std::endl; \
throw std::runtime_error(msg); \
} \
} while (0)