SWDEV-348820 - Fix hipPointerAttribute_t incompatibility (#2856)

- Mark hipPointerAttribute_t.memoryType deprecated
- Instead add hipPointerAttribute_t.type
- Update testcases & documentation to use hipPointerAttribute_t.type

Change-Id: I3ba58cd2defe82102f9415bbb90cf151e08499dd
Šī revīzija ir iekļauta:
ROCm CI Service Account authored and GitHub committed 2022-10-12 08:31:25 +05:30
1 vecāks 5219f5707f
revīzija 96b3b9eaf5
4 files changed
+48 -38

No files matched your search

+17 -10
Parādīt failu
@@ -153,24 +153,31 @@ typedef struct hipDeviceProp_t {
} hipDeviceProp_t;
/**
* Memory type (for pointer attributes)
/*
* @brief HIP Memory type (for pointer attributes)
* @enum
* @ingroup Enumerations
*/
typedef enum hipMemoryType {
hipMemoryTypeHost, ///< Memory is physically located on host
hipMemoryTypeDevice, ///< Memory is physically located on device. (see deviceId for specific
///< device)
hipMemoryTypeArray, ///< Array memory, physically located on device. (see deviceId for specific
///< device)
hipMemoryTypeUnified, ///< Not used currently
hipMemoryTypeManaged ///< Managed memory, automaticallly managed by the unified memory system
hipMemoryTypeHost = 0, ///< Memory is physically located on host
hipMemoryTypeDevice = 1, ///< Memory is physically located on device. (see deviceId for
///< specific device)
hipMemoryTypeArray = 2, ///< Array memory, physically located on device. (see deviceId for
///< specific device)
hipMemoryTypeUnified = 3, ///< Not used currently
hipMemoryTypeManaged = 4 ///< Managed memory, automaticallly managed by the unified
///< memory system
} hipMemoryType;
/**
* Pointer attributes
*/
typedef struct hipPointerAttribute_t {
enum hipMemoryType memoryType;
union {
// Deprecated, use instead type
enum hipMemoryType memoryType;
enum hipMemoryType type;
};
int device;
void* devicePointer;
void* hostPointer;