|
HAMR
The Heterogeneous Accelerator Memory Resource
|
Go to the documentation of this file.
4 #include "hamr_config.h"
5 #if defined(HAMR_ENABLE_CUDA)
7 #elif defined(HAMR_ENABLE_HIP)
9 #elif defined(HAMR_ENABLE_OPENMP)
20 #if defined(HAMR_ENABLE_CUDA)
22 #elif defined(HAMR_ENABLE_HIP)
24 #elif defined(HAMR_ENABLE_OPENMP)
35 #if defined(HAMR_ENABLE_CUDA)
37 #elif defined(HAMR_ENABLE_HIP)
39 #elif defined(HAMR_ENABLE_OPENMP)
50 #if defined(HAMR_ENABLE_CUDA)
52 #elif defined(HAMR_ENABLE_HIP)
54 #elif defined(HAMR_ENABLE_OPENMP)
65 #if defined(HAMR_ENABLE_CUDA)
67 #elif defined(HAMR_ENABLE_HIP)
69 #elif defined(HAMR_ENABLE_OPENMP)
77 inline int HAMR_EXPORT
get_device(
const void *ptr,
int &device_id)
79 #if defined(HAMR_ENABLE_CUDA)
81 #elif defined(HAMR_ENABLE_HIP)
83 #elif defined(HAMR_ENABLE_OPENMP)
91 #if defined(HAMR_ENABLE_CUDA)
92 using activate_device = activate_cuda_device;
93 #elif defined(HAMR_ENABLE_HIP)
94 using activate_device = activate_hip_device;
95 #elif defined(HAMR_ENABLE_OPENMP)
96 using activate_device = activate_openmp_device;
int HAMR_EXPORT get_cuda_cpu_identifier(int &dev_id)
gets the device identifier for the CPU.
Definition: hamr_cuda_device.h:14
int HAMR_EXPORT set_active_cuda_device(int dev_id)
sets the active CUDA device. returns zero if successful.
int HAMR_EXPORT get_cuda_device(const void *ptr, int &device_id)
gets the device that owns the given pointer.
int HAMR_EXPORT get_openmp_device(const void *ptr, int &device_id)
gets the device that owns the given pointer.
int HAMR_EXPORT get_cpu_identifier(int &dev_id)
gets the device identifier for the CPU.
Definition: hamr_device.h:33
int HAMR_EXPORT get_cuda_device_identifier(int &dev_id)
gets the device identifier for the first GPU.
Definition: hamr_cuda_device.h:11
int HAMR_EXPORT get_hip_device(const void *ptr, int &device_id)
gets the device that owns the given pointer.
int HAMR_EXPORT get_active_cuda_device(int &dev_id)
gets the currently atcive CUDA device.
int HAMR_EXPORT get_active_device(int &dev_id)
gets the currently atcive device.
Definition: hamr_device.h:48
int HAMR_EXPORT get_device(const void *ptr, int &device_id)
gets the device that owns the given pointer.
Definition: hamr_device.h:77
int HAMR_EXPORT get_device_identifier(int &dev_id)
gets the device identifier for the first GPU.
Definition: hamr_device.h:18
int HAMR_EXPORT set_active_hip_device(int dev_id)
sets the active HIP device. returns zero if successful.
heterogeneous accelerator memory resource
Definition: hamr_buffer.h:40
int HAMR_EXPORT set_active_device(int dev_id)
sets the active device. returns zero if successful.
Definition: hamr_device.h:63
Definition: hamr_device.h:101
int HAMR_EXPORT get_openmp_cpu_identifier(int &dev_id)
gets the device identifier for the CPU.
int HAMR_EXPORT get_openmp_device_identifier(int &dev_id)
gets the device identifier for the first GPU.
Definition: hamr_openmp_device.h:11
int HAMR_EXPORT get_hip_device_identifier(int &dev_id)
gets the device identifier for the first GPU.
Definition: hamr_hip_device.h:11
int HAMR_EXPORT set_active_openmp_device(int dev_id)
sets the active HIP device. returns zero if successful.
int HAMR_EXPORT get_active_openmp_device(int &dev_id)
gets the currently atcive HIP device. returns zero if successful.
int HAMR_EXPORT get_hip_cpu_identifier(int &dev_id)
gets the device identifier for the CPU.
Definition: hamr_hip_device.h:14
int HAMR_EXPORT get_active_hip_device(int &dev_id)
gets the currently atcive HIP device. returns zero if successful.