@@ -1481,7 +1481,7 @@ hipError_t hipMallocArray(hipArray** array, const hipChannelFormatDesc* desc, si
|
|||||||
size_t height __dparm(0), unsigned int flags __dparm(hipArrayDefault));
|
size_t height __dparm(0), unsigned int flags __dparm(hipArrayDefault));
|
||||||
hipError_t hipArrayCreate(hipArray** pHandle, const HIP_ARRAY_DESCRIPTOR* pAllocateArray);
|
hipError_t hipArrayCreate(hipArray** pHandle, const HIP_ARRAY_DESCRIPTOR* pAllocateArray);
|
||||||
|
|
||||||
hipError_t hipArray3DCreate(hipArray_t* array, const HIP_ARRAY_DESCRIPTOR* pAllocateArray);
|
hipError_t hipArray3DCreate(hipArray** array, const HIP_ARRAY_DESCRIPTOR* pAllocateArray);
|
||||||
|
|
||||||
hipError_t hipMalloc3D(hipPitchedPtr* pitchedDevPtr, hipExtent extent);
|
hipError_t hipMalloc3D(hipPitchedPtr* pitchedDevPtr, hipExtent extent);
|
||||||
|
|
||||||
@@ -1507,7 +1507,7 @@ hipError_t hipFreeArray(hipArray* array);
|
|||||||
* @see hipMalloc, hipMallocPitch, hipFree, hipFreeArray, hipHostMalloc, hipHostFree
|
* @see hipMalloc, hipMallocPitch, hipFree, hipFreeArray, hipHostMalloc, hipHostFree
|
||||||
*/
|
*/
|
||||||
|
|
||||||
hipError_t hipMalloc3DArray(hipArray_t* array, const struct hipChannelFormatDesc* desc,
|
hipError_t hipMalloc3DArray(hipArray** array, const struct hipChannelFormatDesc* desc,
|
||||||
struct hipExtent extent, unsigned int flags);
|
struct hipExtent extent, unsigned int flags);
|
||||||
/**
|
/**
|
||||||
* @brief Copies data between host and device.
|
* @brief Copies data between host and device.
|
||||||
|
|||||||
@@ -150,13 +150,20 @@ typedef CUfunction hipFunction_t;
|
|||||||
typedef CUdeviceptr hipDeviceptr_t;
|
typedef CUdeviceptr hipDeviceptr_t;
|
||||||
typedef struct cudaArray hipArray;
|
typedef struct cudaArray hipArray;
|
||||||
typedef struct cudaArray* hipArray_const_t;
|
typedef struct cudaArray* hipArray_const_t;
|
||||||
|
typedef cudaMemcpy3DParms hipMemcpy3DParms;
|
||||||
|
//#define hipMemcpy3DParms cudaMemcpy3DParms
|
||||||
#define hipArrayDefault cudaArrayDefault
|
#define hipArrayDefault cudaArrayDefault
|
||||||
|
|
||||||
typedef cudaTextureObject_t hipTextureObject_t;
|
typedef cudaTextureObject_t hipTextureObject_t;
|
||||||
typedef cudaSurfaceObject_t hipSurfaceObject_t;
|
typedef cudaSurfaceObject_t hipSurfaceObject_t;
|
||||||
#define hipTextureType2D cudaTextureType2D;
|
#define hipTextureType2D cudaTextureType2D
|
||||||
|
#define hipTextureType3D cudaTextureType3D
|
||||||
#define hipDeviceMapHost cudaDeviceMapHost
|
#define hipDeviceMapHost cudaDeviceMapHost
|
||||||
|
|
||||||
|
#define hipExtent cudaExtent
|
||||||
|
#define make_hipExtent make_cudaExtent
|
||||||
|
#define make_hipPos make_cudaPos
|
||||||
|
#define make_hipPitchedPtr make_cudaPitchedPtr
|
||||||
// Flags that can be used with hipStreamCreateWithFlags
|
// Flags that can be used with hipStreamCreateWithFlags
|
||||||
#define hipStreamDefault cudaStreamDefault
|
#define hipStreamDefault cudaStreamDefault
|
||||||
#define hipStreamNonBlocking cudaStreamNonBlocking
|
#define hipStreamNonBlocking cudaStreamNonBlocking
|
||||||
@@ -399,6 +406,11 @@ inline static hipError_t hipMallocArray(hipArray** array, const struct hipChanne
|
|||||||
return hipCUDAErrorTohipError(cudaMallocArray(array, desc, width, height, flags));
|
return hipCUDAErrorTohipError(cudaMallocArray(array, desc, width, height, flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline static hipError_t hipMalloc3DArray(hipArray** array, const struct hipChannelFormatDesc* desc,
|
||||||
|
struct hipExtent extent, unsigned int flags) {
|
||||||
|
return hipCUDAErrorTohipError(cudaMalloc3DArray(array, desc, extent, flags));
|
||||||
|
}
|
||||||
|
|
||||||
inline static hipError_t hipFreeArray(hipArray* array) {
|
inline static hipError_t hipFreeArray(hipArray* array) {
|
||||||
return hipCUDAErrorTohipError(cudaFreeArray(array));
|
return hipCUDAErrorTohipError(cudaFreeArray(array));
|
||||||
}
|
}
|
||||||
@@ -531,6 +543,11 @@ inline static hipError_t hipMemcpy2D(void* dst, size_t dpitch, const void* src,
|
|||||||
cudaMemcpy2D(dst, dpitch, src, spitch, width, height, hipMemcpyKindToCudaMemcpyKind(kind)));
|
cudaMemcpy2D(dst, dpitch, src, spitch, width, height, hipMemcpyKindToCudaMemcpyKind(kind)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline static hipError_t hipMemcpy3D(const struct hipMemcpy3DParms *p)
|
||||||
|
{
|
||||||
|
return hipCUDAErrorTohipError(cudaMemcpy3D(p));
|
||||||
|
}
|
||||||
|
|
||||||
inline static hipError_t hipMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch,
|
inline static hipError_t hipMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch,
|
||||||
size_t width, size_t height, hipMemcpyKind kind,
|
size_t width, size_t height, hipMemcpyKind kind,
|
||||||
hipStream_t stream) {
|
hipStream_t stream) {
|
||||||
|
|||||||
@@ -641,7 +641,7 @@ hipError_t hipMallocArray(hipArray** array, const hipChannelFormatDesc* desc, si
|
|||||||
return ihipLogStatus(hip_status);
|
return ihipLogStatus(hip_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
hipError_t hipArray3DCreate(hipArray_t* array, const HIP_ARRAY_DESCRIPTOR* pAllocateArray) {
|
hipError_t hipArray3DCreate(hipArray** array, const HIP_ARRAY_DESCRIPTOR* pAllocateArray) {
|
||||||
HIP_INIT_SPECIAL_API((TRACE_MEM), array, pAllocateArray);
|
HIP_INIT_SPECIAL_API((TRACE_MEM), array, pAllocateArray);
|
||||||
hipError_t hip_status = hipSuccess;
|
hipError_t hip_status = hipSuccess;
|
||||||
|
|
||||||
@@ -764,7 +764,7 @@ hipError_t hipArray3DCreate(hipArray_t* array, const HIP_ARRAY_DESCRIPTOR* pAllo
|
|||||||
return ihipLogStatus(hip_status);
|
return ihipLogStatus(hip_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
hipError_t hipMalloc3DArray(hipArray_t* array, const struct hipChannelFormatDesc* desc,
|
hipError_t hipMalloc3DArray(hipArray** array, const struct hipChannelFormatDesc* desc,
|
||||||
struct hipExtent extent, unsigned int flags) {
|
struct hipExtent extent, unsigned int flags) {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Odkázat v novém úkolu
Zablokovat Uživatele