Changeset View
Changeset View
Standalone View
Standalone View
extern/hipew/include/hipew.h
| Show First 20 Lines • Show All 798 Lines • ▼ Show 20 Lines | |||||
| typedef enum hipDeviceP2PAttr { | typedef enum hipDeviceP2PAttr { | ||||
| hipDevP2PAttrPerformanceRank = 0, | hipDevP2PAttrPerformanceRank = 0, | ||||
| hipDevP2PAttrAccessSupported, | hipDevP2PAttrAccessSupported, | ||||
| hipDevP2PAttrNativeAtomicSupported, | hipDevP2PAttrNativeAtomicSupported, | ||||
| hipDevP2PAttrHipArrayAccessSupported | hipDevP2PAttrHipArrayAccessSupported | ||||
| } hipDeviceP2PAttr; | } hipDeviceP2PAttr; | ||||
| typedef struct HIP_MEMCPY3D { | typedef struct HIP_MEMCPY3D { | ||||
| size_t srcXInBytes; | unsigned int srcXInBytes; | ||||
| size_t srcY; | unsigned int srcY; | ||||
| size_t srcZ; | unsigned int srcZ; | ||||
| size_t srcLOD; | unsigned int srcLOD; | ||||
| hipMemoryType srcMemoryType; | hipMemoryType srcMemoryType; | ||||
| const void* srcHost; | const void* srcHost; | ||||
| hipDeviceptr_t srcDevice; | hipDeviceptr_t srcDevice; | ||||
| hArray * srcArray; | hArray srcArray; | ||||
| void* reserved0; | unsigned int srcPitch; | ||||
| size_t srcPitch; | unsigned int srcHeight; | ||||
| size_t srcHeight; | unsigned int dstXInBytes; | ||||
| size_t dstXInBytes; | unsigned int dstY; | ||||
| size_t dstY; | unsigned int dstZ; | ||||
| size_t dstZ; | unsigned int dstLOD; | ||||
| size_t dstLOD; | |||||
| hipMemoryType dstMemoryType; | hipMemoryType dstMemoryType; | ||||
| void* dstHost; | void* dstHost; | ||||
| hipDeviceptr_t dstDevice; | hipDeviceptr_t dstDevice; | ||||
| hArray * dstArray; | hArray dstArray; | ||||
| void* reserved1; | unsigned int dstPitch; | ||||
| size_t dstPitch; | unsigned int dstHeight; | ||||
| size_t dstHeight; | unsigned int WidthInBytes; | ||||
| size_t WidthInBytes; | unsigned int Height; | ||||
| size_t Height; | unsigned int Depth; | ||||
| size_t Depth; | |||||
| } HIP_MEMCPY3D; | } HIP_MEMCPY3D; | ||||
| typedef struct HIP_MEMCPY3D_PEER_st { | typedef struct HIP_MEMCPY3D_PEER_st { | ||||
| size_t srcXInBytes; | size_t srcXInBytes; | ||||
| size_t srcY; | size_t srcY; | ||||
| size_t srcZ; | size_t srcZ; | ||||
| size_t srcLOD; | size_t srcLOD; | ||||
| hipMemoryType srcMemoryType; | hipMemoryType srcMemoryType; | ||||
| Show All 34 Lines | typedef struct HIP_ARRAY3D_DESCRIPTOR { | ||||
| unsigned int NumChannels; | unsigned int NumChannels; | ||||
| unsigned int Flags; | unsigned int Flags; | ||||
| } HIP_ARRAY3D_DESCRIPTOR; | } HIP_ARRAY3D_DESCRIPTOR; | ||||
| typedef struct HIP_RESOURCE_DESC_st { | typedef struct HIP_RESOURCE_DESC_st { | ||||
| hipResourceType resType; | hipResourceType resType; | ||||
| union { | union { | ||||
| struct { | struct { | ||||
| hArray * h_Array; | hArray h_Array; | ||||
| } array; | } array; | ||||
| struct { | struct { | ||||
| hipMipmappedArray_t hMipmappedArray; | hipMipmappedArray_t hMipmappedArray; | ||||
| } mipmap; | } mipmap; | ||||
| struct { | struct { | ||||
| hipDeviceptr_t devPtr; | hipDeviceptr_t devPtr; | ||||
| hipArray_Format format; | hipArray_Format format; | ||||
| unsigned int numChannels; | unsigned int numChannels; | ||||
| ▲ Show 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | typedef enum hiprtcResult { | ||||
| HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10, | HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10, | ||||
| HIPRTC_ERROR_INTERNAL_ERROR = 11 | HIPRTC_ERROR_INTERNAL_ERROR = 11 | ||||
| } hiprtcResult; | } hiprtcResult; | ||||
| /* Function types. */ | /* Function types. */ | ||||
| typedef hipError_t HIPAPI thipGetErrorName(hipError_t error, const char** pStr); | typedef hipError_t HIPAPI thipGetErrorName(hipError_t error, const char** pStr); | ||||
| typedef hipError_t HIPAPI thipInit(unsigned int Flags); | typedef hipError_t HIPAPI thipInit(unsigned int Flags); | ||||
| typedef hipError_t HIPAPI thipDriverGetVersion(int* driverVersion); | typedef hipError_t HIPAPI thipDriverGetVersion(int* driverVersion); | ||||
| typedef hipError_t HIPAPI thipGetDevice(hipDevice_t* device, int ordinal); | typedef hipError_t HIPAPI thipGetDevice(int* device); | ||||
| typedef hipError_t HIPAPI thipGetDeviceCount(int* count); | typedef hipError_t HIPAPI thipGetDeviceCount(int* count); | ||||
| typedef hipError_t HIPAPI thipGetDeviceProperties(hipDeviceProp_t* props, int deviceId); | typedef hipError_t HIPAPI thipGetDeviceProperties(hipDeviceProp_t* props, int deviceId); | ||||
| typedef hipError_t HIPAPI thipDeviceGet(hipDevice_t* device, int ordinal); | |||||
| typedef hipError_t HIPAPI thipDeviceGetName(char* name, int len, hipDevice_t dev); | typedef hipError_t HIPAPI thipDeviceGetName(char* name, int len, hipDevice_t dev); | ||||
| typedef hipError_t HIPAPI thipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attrib, hipDevice_t dev); | typedef hipError_t HIPAPI thipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attrib, hipDevice_t dev); | ||||
| typedef hipError_t HIPAPI thipDeviceComputeCapability(int* major, int* minor, hipDevice_t dev); | typedef hipError_t HIPAPI thipDeviceComputeCapability(int* major, int* minor, hipDevice_t dev); | ||||
| typedef hipError_t HIPAPI thipDevicePrimaryCtxRetain(hipCtx_t* pctx, hipDevice_t dev); | typedef hipError_t HIPAPI thipDevicePrimaryCtxRetain(hipCtx_t* pctx, hipDevice_t dev); | ||||
| typedef hipError_t HIPAPI thipDevicePrimaryCtxRelease(hipDevice_t dev); | typedef hipError_t HIPAPI thipDevicePrimaryCtxRelease(hipDevice_t dev); | ||||
| typedef hipError_t HIPAPI thipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags); | typedef hipError_t HIPAPI thipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags); | ||||
| typedef hipError_t HIPAPI thipDevicePrimaryCtxGetState(hipDevice_t dev, unsigned int* flags, int* active); | typedef hipError_t HIPAPI thipDevicePrimaryCtxGetState(hipDevice_t dev, unsigned int* flags, int* active); | ||||
| typedef hipError_t HIPAPI thipDevicePrimaryCtxReset(hipDevice_t dev); | typedef hipError_t HIPAPI thipDevicePrimaryCtxReset(hipDevice_t dev); | ||||
| ▲ Show 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | |||||
| /* Function declarations. */ | /* Function declarations. */ | ||||
| extern thipGetErrorName *hipGetErrorName; | extern thipGetErrorName *hipGetErrorName; | ||||
| extern thipInit *hipInit; | extern thipInit *hipInit; | ||||
| extern thipDriverGetVersion *hipDriverGetVersion; | extern thipDriverGetVersion *hipDriverGetVersion; | ||||
| extern thipGetDevice *hipGetDevice; | extern thipGetDevice *hipGetDevice; | ||||
| extern thipGetDeviceCount *hipGetDeviceCount; | extern thipGetDeviceCount *hipGetDeviceCount; | ||||
| extern thipGetDeviceProperties *hipGetDeviceProperties; | extern thipGetDeviceProperties *hipGetDeviceProperties; | ||||
| extern thipDeviceGet* hipDeviceGet; | |||||
| extern thipDeviceGetName *hipDeviceGetName; | extern thipDeviceGetName *hipDeviceGetName; | ||||
| extern thipDeviceGetAttribute *hipDeviceGetAttribute; | extern thipDeviceGetAttribute *hipDeviceGetAttribute; | ||||
| extern thipDeviceComputeCapability *hipDeviceComputeCapability; | extern thipDeviceComputeCapability *hipDeviceComputeCapability; | ||||
| extern thipDevicePrimaryCtxRetain *hipDevicePrimaryCtxRetain; | extern thipDevicePrimaryCtxRetain *hipDevicePrimaryCtxRetain; | ||||
| extern thipDevicePrimaryCtxRelease *hipDevicePrimaryCtxRelease; | extern thipDevicePrimaryCtxRelease *hipDevicePrimaryCtxRelease; | ||||
| extern thipDevicePrimaryCtxSetFlags *hipDevicePrimaryCtxSetFlags; | extern thipDevicePrimaryCtxSetFlags *hipDevicePrimaryCtxSetFlags; | ||||
| extern thipDevicePrimaryCtxGetState *hipDevicePrimaryCtxGetState; | extern thipDevicePrimaryCtxGetState *hipDevicePrimaryCtxGetState; | ||||
| extern thipDevicePrimaryCtxReset *hipDevicePrimaryCtxReset; | extern thipDevicePrimaryCtxReset *hipDevicePrimaryCtxReset; | ||||
| ▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | |||||
| extern thiprtcGetCode* hiprtcGetCode; | extern thiprtcGetCode* hiprtcGetCode; | ||||
| extern thiprtcGetCodeSize* hiprtcGetCodeSize; | extern thiprtcGetCodeSize* hiprtcGetCodeSize; | ||||
| enum { | enum { | ||||
| HIPEW_SUCCESS = 0, | HIPEW_SUCCESS = 0, | ||||
| HIPEW_ERROR_OPEN_FAILED = -1, | HIPEW_ERROR_OPEN_FAILED = -1, | ||||
| HIPEW_ERROR_ATEXIT_FAILED = -2, | HIPEW_ERROR_ATEXIT_FAILED = -2, | ||||
| HIPEW_ERROR_OLD_DRIVER = -3, | |||||
| }; | }; | ||||
| enum { | enum { | ||||
| HIPEW_INIT_HIP = 1, | HIPEW_INIT_HIP = 1, | ||||
| }; | }; | ||||
| int hipewInit(hipuint32_t flags); | int hipewInit(hipuint32_t flags); | ||||
| const char *hipewErrorString(hipError_t result); | const char *hipewErrorString(hipError_t result); | ||||
| Show All 9 Lines | |||||