mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Hip Happy Birthday
This commit is contained in:
parent
2859955a03
commit
dacbbdd051
@ -286,17 +286,13 @@ void LambdaApply(uint64_t numx, uint64_t numy, uint64_t numz, lambda Lambda)
|
|||||||
|
|
||||||
inline void *acceleratorAllocShared(size_t bytes)
|
inline void *acceleratorAllocShared(size_t bytes)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
void *ptr=NULL;
|
void *ptr=NULL;
|
||||||
auto err = hipMallocManaged((void **)&ptr,bytes);
|
auto err = hipMallocManaged((void **)&ptr,bytes);
|
||||||
if( err != hipSuccess ) {
|
if( err != hipSuccess ) {
|
||||||
ptr = (void *) NULL;
|
ptr = (void *) NULL;
|
||||||
printf(" hipMallocManaged failed for %d %s \n",bytes,hipGetErrorString(err));
|
printf(" hipMallocManaged failed for %ld %s \n",bytes,hipGetErrorString(err));
|
||||||
}
|
}
|
||||||
return ptr;
|
return ptr;
|
||||||
#else
|
|
||||||
return malloc(bytes);
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void *acceleratorAllocDevice(size_t bytes)
|
inline void *acceleratorAllocDevice(size_t bytes)
|
||||||
@ -305,7 +301,7 @@ inline void *acceleratorAllocDevice(size_t bytes)
|
|||||||
auto err = hipMalloc((void **)&ptr,bytes);
|
auto err = hipMalloc((void **)&ptr,bytes);
|
||||||
if( err != hipSuccess ) {
|
if( err != hipSuccess ) {
|
||||||
ptr = (void *) NULL;
|
ptr = (void *) NULL;
|
||||||
printf(" hipMalloc failed for %d %s \n",bytes,hipGetErrorString(err));
|
printf(" hipMalloc failed for %ld %s \n",bytes,hipGetErrorString(err));
|
||||||
}
|
}
|
||||||
return ptr;
|
return ptr;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user