[HIP][HIPIFY] Split HIP_ARRAY_DESCRIPTOR struct to HIP_ARRAY_DESCRIPTOR and HIP_ARRAY3D_DESCRIPTOR
[Reason] To be compatible with CUDA [#1133] Update HIP code, hipify-clang, tests and docs [TODO] Add support of the corresponding functions on nvcc fallback path
This commit is contained in:
@@ -59,14 +59,21 @@ typedef enum hipArray_Format {
|
||||
}hipArray_Format;
|
||||
|
||||
typedef struct HIP_ARRAY_DESCRIPTOR {
|
||||
enum hipArray_Format format;
|
||||
unsigned int numChannels;
|
||||
size_t width;
|
||||
size_t height;
|
||||
unsigned int flags;
|
||||
size_t depth;
|
||||
size_t Width;
|
||||
size_t Height;
|
||||
enum hipArray_Format Format;
|
||||
unsigned int NumChannels;
|
||||
}HIP_ARRAY_DESCRIPTOR;
|
||||
|
||||
typedef struct HIP_ARRAY3D_DESCRIPTOR {
|
||||
size_t Width;
|
||||
size_t Height;
|
||||
size_t Depth;
|
||||
enum hipArray_Format Format;
|
||||
unsigned int NumChannels;
|
||||
unsigned int Flags;
|
||||
}HIP_ARRAY3D_DESCRIPTOR;
|
||||
|
||||
typedef struct hipArray {
|
||||
void* data; // FIXME: generalize this
|
||||
struct hipChannelFormatDesc desc;
|
||||
@@ -74,7 +81,8 @@ typedef struct hipArray {
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int depth;
|
||||
struct HIP_ARRAY_DESCRIPTOR drvDesc;
|
||||
enum hipArray_Format Format;
|
||||
unsigned int NumChannels;
|
||||
bool isDrv;
|
||||
unsigned int textureType;
|
||||
}hipArray;
|
||||
|
||||
@@ -1821,7 +1821,7 @@ hipError_t hipMallocArray(hipArray** array, const hipChannelFormatDesc* desc, si
|
||||
size_t height __dparm(0), unsigned int flags __dparm(hipArrayDefault));
|
||||
hipError_t hipArrayCreate(hipArray** pHandle, const HIP_ARRAY_DESCRIPTOR* pAllocateArray);
|
||||
|
||||
hipError_t hipArray3DCreate(hipArray** array, const HIP_ARRAY_DESCRIPTOR* pAllocateArray);
|
||||
hipError_t hipArray3DCreate(hipArray** array, const HIP_ARRAY3D_DESCRIPTOR* pAllocateArray);
|
||||
|
||||
hipError_t hipMalloc3D(hipPitchedPtr* pitchedDevPtr, hipExtent extent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user