Added support for constant memory

1. Added support for constant memory
2. Added test which uses memcpytosymbol for constant memory
3. Corrected code error on nvcc path

Change-Id: I2ab69f516832bf7a037132ac81273ea6f5107401
This commit is contained in:
Aditya Atluri
2016-10-20 09:57:53 -05:00
parent b4702f3912
commit 3a1c8f9259
3 changed files with 61 additions and 2 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ THE SOFTWARE.
*/
// _restrict is supported by the compiler
#define __shared__ tile_static
#define __constant__ __attribute__((address_space(2)))
#define __constant__ __attribute__((address_space(1)))
#else
// Non-HCC compiler
@@ -741,7 +741,7 @@ inline static hipError_t hipDeviceGetPCIBusId(int *pciBusId,int len,hipDevice_t
inline static hipError_t hipDeviceGetLimit(size_t *pValue, hipLimit_t limit)
{
return hipCUDAErrorTohipError(cudaDeviceGetLimit(pValue, limit);
return hipCUDAErrorTohipError(cudaDeviceGetLimit(pValue, limit));
}
inline static hipError_t hipDeviceTotalMem(size_t *bytes,hipDevice_t device)