Add __device__ to needful functions for promote-free.

[ROCm/hip commit: 29232ff283]
This commit is contained in:
Ben Sander
2017-03-17 11:19:48 -05:00
parent a9ec705ee4
commit 8d5c39fd52
5 changed files with 8 additions and 7 deletions
@@ -443,7 +443,7 @@ do {\
// to local variable definitions
#define HIP_DYNAMIC_SHARED(type, var) \
ADDRESS_SPACE_3 type* var = \
ADDRESS_SPACE_3 type*)__get_dynamicgroupbaseptr(); \
(ADDRESS_SPACE_3 type*)__get_dynamicgroupbaseptr(); \
#define HIP_DYNAMIC_SHARED_ATTRIBUTE ADDRESS_SPACE_3
+2 -2
View File
@@ -41,8 +41,8 @@ struct holder32Bit {
};
} __attribute__((aligned(4)));
struct holder64Bit hold64;
struct holder32Bit hold32;
__device__ struct holder64Bit hold64;
__device__ struct holder32Bit hold32;
__device__ float __double2float_rd(double x)
{
+2 -2
View File
@@ -34,8 +34,8 @@ THE SOFTWARE.
This is the best place to put them because the device
global variables need to be initialized at the start.
*/
ADDRESS_SPACE_1 char gpuHeap[SIZE_OF_HEAP];
ADDRESS_SPACE_1 uint32_t gpuFlags[NUM_PAGES];
__device__ ADDRESS_SPACE_1 char gpuHeap[SIZE_OF_HEAP];
__device__ ADDRESS_SPACE_1 uint32_t gpuFlags[NUM_PAGES];
__device__ void *__hip_hc_malloc(size_t size)
{
+1 -1
View File
@@ -31,7 +31,7 @@ struct hipHalfHolder{
#define HINF 65504
static struct hipHalfHolder __hInfValue = {HINF};
__device__ static struct hipHalfHolder __hInfValue = {HINF};
__device__ __half __hadd(__half a, __half b) {
return a + b;
+2 -1
View File
@@ -202,7 +202,8 @@ __device__ long long int llroundf(float x)
int y = hc::precise_math::roundf(x);
long long int z = y;
return z;
}__device__ float log10f(float x)
}
__device__ float log10f(float x)
{
return hc::precise_math::log10f(x);
}