fixed compilation bugs
1. Texture functions are now compiling fine 2. Fixed hipFuncCache to hipFuncCache_t Change-Id: I8f815887e4de43ee115bbaff249905b236541c39
This commit is contained in:
@@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef HCC_H
|
||||
#define HCC_H
|
||||
#ifndef HIP_HCC_H
|
||||
#define HIP_HCC_H
|
||||
|
||||
#if defined(__HIP_PLATFORM_HCC__) && !defined (__HIP_PLATFORM_NVCC__)
|
||||
#include "hip/hcc_detail/hcc_acc.h"
|
||||
|
||||
@@ -321,7 +321,7 @@ hipError_t hipGetDeviceProperties(hipDeviceProp_t* prop, int deviceId);
|
||||
* Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures.
|
||||
*
|
||||
*/
|
||||
hipError_t hipDeviceSetCacheConfig ( hipFuncCache cacheConfig );
|
||||
hipError_t hipDeviceSetCacheConfig ( hipFuncCache_t cacheConfig );
|
||||
|
||||
|
||||
/**
|
||||
@@ -333,7 +333,7 @@ hipError_t hipDeviceSetCacheConfig ( hipFuncCache cacheConfig );
|
||||
* Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures.
|
||||
*
|
||||
*/
|
||||
hipError_t hipDeviceGetCacheConfig ( hipFuncCache *cacheConfig );
|
||||
hipError_t hipDeviceGetCacheConfig ( hipFuncCache_t *cacheConfig );
|
||||
|
||||
/**
|
||||
* @brief Get Resource limits of current device
|
||||
@@ -357,7 +357,7 @@ hipError_t hipDeviceGetLimit(size_t *pValue, hipLimit_t limit);
|
||||
* Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures.
|
||||
*
|
||||
*/
|
||||
hipError_t hipFuncSetCacheConfig ( hipFuncCache config );
|
||||
hipError_t hipFuncSetCacheConfig ( hipFuncCache_t config );
|
||||
|
||||
/**
|
||||
* @brief Returns bank width of shared memory for current device
|
||||
@@ -1460,7 +1460,7 @@ hipError_t hipCtxGetApiVersion (hipCtx_t ctx,int *apiVersion);
|
||||
*
|
||||
* @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice
|
||||
*/
|
||||
hipError_t hipCtxGetCacheConfig ( hipFuncCache *cacheConfig );
|
||||
hipError_t hipCtxGetCacheConfig ( hipFuncCache_t *cacheConfig );
|
||||
|
||||
/**
|
||||
* @brief Set L1/Shared cache partition.
|
||||
@@ -1473,7 +1473,7 @@ hipError_t hipCtxGetCacheConfig ( hipFuncCache *cacheConfig );
|
||||
*
|
||||
* @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice
|
||||
*/
|
||||
hipError_t hipCtxSetCacheConfig ( hipFuncCache cacheConfig );
|
||||
hipError_t hipCtxSetCacheConfig ( hipFuncCache_t cacheConfig );
|
||||
|
||||
/**
|
||||
* @brief Set Shared memory bank configuration.
|
||||
|
||||
@@ -22,8 +22,8 @@ THE SOFTWARE.
|
||||
|
||||
//#pragma once
|
||||
|
||||
#ifndef HIP_TEXTURE_H
|
||||
#define HIP_TEXTURE_H
|
||||
#ifndef HIP_HCC_DETAIL_TEXTURE_H
|
||||
#define HIP_HCC_DETAIL_TEXTURE_H
|
||||
|
||||
/**
|
||||
* @file hcc_detail/hip_texture.h
|
||||
@@ -32,7 +32,7 @@ THE SOFTWARE.
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include <hip/hcc_detail/hip_runtime.h>
|
||||
//#include <hip/hcc_detail/hip_runtime.h>
|
||||
|
||||
//----
|
||||
//Texture - TODO - likely need to move this to a separate file only included with kernel compilation.
|
||||
@@ -84,7 +84,7 @@ struct texture : public textureReference {
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef struct hipArray {
|
||||
typedef struct {
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
hipChannelFormatKind f;
|
||||
|
||||
@@ -22,13 +22,15 @@ THE SOFTWARE.
|
||||
|
||||
|
||||
|
||||
#ifndef HIP_TEXTURE_H
|
||||
#define HIP_TEXTURE_H
|
||||
#ifndef HIP_HIP_TEXTURE_H
|
||||
#define HIP_HIP_TEXTURE_H
|
||||
|
||||
#if defined(__HIP_PLATFORM_HCC__) && !defined (__HIP_PLATFORM_NVCC__)
|
||||
#include <hip/hcc_detail/hip_texture.h>
|
||||
#warning "Including hcc"
|
||||
#elif defined(__HIP_PLATFORM_NVCC__) && !defined (__HIP_PLATFORM_HCC__)
|
||||
#include <hip/nvcc_detail/hip_texture.h>
|
||||
#warning "Including Nvcc"
|
||||
#else
|
||||
#error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
|
||||
#endif
|
||||
|
||||
@@ -217,7 +217,7 @@ hipError_t hipCtxGetApiVersion (hipCtx_t ctx,int *apiVersion)
|
||||
return ihipLogStatus(hipSuccess);
|
||||
}
|
||||
|
||||
hipError_t hipCtxGetCacheConfig ( hipFuncCache *cacheConfig )
|
||||
hipError_t hipCtxGetCacheConfig ( hipFuncCache_t *cacheConfig )
|
||||
{
|
||||
HIP_INIT_API(cacheConfig);
|
||||
|
||||
@@ -226,7 +226,7 @@ hipError_t hipCtxGetCacheConfig ( hipFuncCache *cacheConfig )
|
||||
return ihipLogStatus(hipSuccess);
|
||||
}
|
||||
|
||||
hipError_t hipCtxSetCacheConfig ( hipFuncCache cacheConfig )
|
||||
hipError_t hipCtxSetCacheConfig ( hipFuncCache_t cacheConfig )
|
||||
{
|
||||
HIP_INIT_API(cacheConfig);
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig)
|
||||
return ihipLogStatus(hipSuccess);
|
||||
}
|
||||
|
||||
hipError_t hipDeviceGetCacheConfig(hipFuncCache *cacheConfig)
|
||||
hipError_t hipDeviceGetCacheConfig(hipFuncCache_t *cacheConfig)
|
||||
{
|
||||
HIP_INIT_API(cacheConfig);
|
||||
|
||||
@@ -105,7 +105,7 @@ hipError_t hipDeviceGetLimit (size_t *pValue, hipLimit_t limit)
|
||||
}
|
||||
}
|
||||
|
||||
hipError_t hipFuncSetCacheConfig (hipFuncCache cacheConfig)
|
||||
hipError_t hipFuncSetCacheConfig (hipFuncCache_t cacheConfig)
|
||||
{
|
||||
HIP_INIT_API(cacheConfig);
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ THE SOFTWARE.
|
||||
|
||||
#include "hip/hip_runtime.h"
|
||||
#include "hip/hip_texture.h"
|
||||
#include "hip/hip_runtime_api.h"
|
||||
|
||||
#define HC __attribute__((hc))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user