#include <stdio.h>#include <stdlib.h>#include <string.h>#include <hip/hip_runtime.h>#include "AMP/utils/UtilityMacros.h"#include "StackTrace/source_location.h"
Go to the source code of this file.
Namespaces | |
| namespace | AMP |
| namespace | AMP::Utilities |
Macros | |
| #define | deviceBind(...) checkHipErrors( hipSetDevice( __VA_ARGS__ ) ) |
| #define | deviceFree(...) checkHipErrors( hipFree( __VA_ARGS__ ) ) |
| #define | deviceGetCount(...) checkHipErrors( hipGetDeviceCount( __VA_ARGS__ ) ) |
| #define | deviceId(...) checkHipErrors( hipGetDevice( __VA_ARGS__ ) ) |
| #define | deviceInit(...) checkHipErrors( hipInit( __VA_ARGS__ ) ) |
| #define | deviceMalloc(...) checkHipErrors( hipMalloc( __VA_ARGS__ ) ) |
| #define | deviceMallocManaged(...) checkHipErrors( hipMallocManaged( __VA_ARGS__ ) ) |
| #define | deviceMemAttachGlobal hipMemAttachGlobal |
| #define | deviceMemcpy(...) checkHipErrors( hipMemcpy( __VA_ARGS__ ) ) |
| #define | deviceMemcpyDeviceToDevice hipMemcpyDeviceToDevice |
| #define | deviceMemcpyDeviceToHost hipMemcpyDeviceToHost |
| #define | deviceMemcpyHostToDevice hipMemcpyHostToDevice |
| #define | deviceMemPrefetchAsync(...) checkHipErrors( hipMemPrefetchAsync( __VA_ARGS__ ) ) |
| #define | deviceMemset(...) checkHipErrors( hipMemset( __VA_ARGS__ ) ) |
| #define | deviceSynchronize() checkHipErrors( hipDeviceSynchronize() ) |
| #define | hostDeviceId hipCpuDeviceId |
Functions | |
| template<typename T > | |
| void | checkHipErrors (T result, const StackTrace::source_location &source=SOURCE_LOCATION_CURRENT()) |
| AMP::Utilities::MemoryType | getHipMemoryType (const void *ptr) |
| void | getLastDeviceError (const char *errorMessage, const StackTrace::source_location &source=SOURCE_LOCATION_CURRENT()) |
| template<typename T > | |
| const char * | hipGetName (T result) |
| static void | setKernelDims (size_t n, dim3 &BlockDim, dim3 &GridDim) |
| #define deviceBind | ( | ... | ) | checkHipErrors( hipSetDevice( __VA_ARGS__ ) ) |
Definition at line 23 of file Helper_Hip.h.
| #define deviceFree | ( | ... | ) | checkHipErrors( hipFree( __VA_ARGS__ ) ) |
Definition at line 30 of file Helper_Hip.h.
| #define deviceGetCount | ( | ... | ) | checkHipErrors( hipGetDeviceCount( __VA_ARGS__ ) ) |
Definition at line 22 of file Helper_Hip.h.
| #define deviceId | ( | ... | ) | checkHipErrors( hipGetDevice( __VA_ARGS__ ) ) |
Definition at line 24 of file Helper_Hip.h.
| #define deviceInit | ( | ... | ) | checkHipErrors( hipInit( __VA_ARGS__ ) ) |
Definition at line 21 of file Helper_Hip.h.
| #define deviceMalloc | ( | ... | ) | checkHipErrors( hipMalloc( __VA_ARGS__ ) ) |
Definition at line 26 of file Helper_Hip.h.
| #define deviceMallocManaged | ( | ... | ) | checkHipErrors( hipMallocManaged( __VA_ARGS__ ) ) |
Definition at line 27 of file Helper_Hip.h.
| #define deviceMemAttachGlobal hipMemAttachGlobal |
Definition at line 15 of file Helper_Hip.h.
| #define deviceMemcpy | ( | ... | ) | checkHipErrors( hipMemcpy( __VA_ARGS__ ) ) |
Definition at line 28 of file Helper_Hip.h.
| #define deviceMemcpyDeviceToDevice hipMemcpyDeviceToDevice |
Definition at line 19 of file Helper_Hip.h.
| #define deviceMemcpyDeviceToHost hipMemcpyDeviceToHost |
Definition at line 18 of file Helper_Hip.h.
| #define deviceMemcpyHostToDevice hipMemcpyHostToDevice |
Definition at line 17 of file Helper_Hip.h.
| #define deviceMemPrefetchAsync | ( | ... | ) | checkHipErrors( hipMemPrefetchAsync( __VA_ARGS__ ) ) |
Definition at line 31 of file Helper_Hip.h.
| #define deviceMemset | ( | ... | ) | checkHipErrors( hipMemset( __VA_ARGS__ ) ) |
Definition at line 29 of file Helper_Hip.h.
| #define deviceSynchronize | ( | ) | checkHipErrors( hipDeviceSynchronize() ) |
Definition at line 25 of file Helper_Hip.h.
| #define hostDeviceId hipCpuDeviceId |
Definition at line 13 of file Helper_Hip.h.
| void checkHipErrors | ( | T | result, |
| const StackTrace::source_location & | source = SOURCE_LOCATION_CURRENT() |
||
| ) |
| AMP::Utilities::MemoryType getHipMemoryType | ( | const void * | ptr | ) |
| void getLastDeviceError | ( | const char * | errorMessage, |
| const StackTrace::source_location & | source = SOURCE_LOCATION_CURRENT() |
||
| ) |
| const char * hipGetName | ( | T | result | ) |
|
inlinestatic |
Definition at line 53 of file Helper_Hip.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:41. Comments on this page |