Commit 7988d4eb authored by Berrill, Mark's avatar Berrill, Mark
Browse files

Fixing bugs with HIP

parent 207b5404
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ const RayTrace::ray_gain_struct* ray_gain_struct_copy_device_hip( size_t N, cons
    return dev_ptr;
}
// Free ray_gain_struct from GPU
void ray_gain_struct_free_device_cuda( size_t N, const RayTrace::ray_gain_struct* dev_ptr )
void ray_gain_struct_free_device_hip( size_t N, const RayTrace::ray_gain_struct* dev_ptr )
{
    RayTrace::ray_gain_struct* host_ptr = new RayTrace::ray_gain_struct[N];
    hipMemcpy(host_ptr,dev_ptr,N*sizeof(RayTrace::ray_gain_struct),hipMemcpyDeviceToHost);
+4 −1
Original line number Diff line number Diff line
@@ -2030,7 +2030,10 @@ void RayTrace::ray_gain_struct::free_device(
{
    if ( device_arr == nullptr )
        return;
#if defined( USE_HIP )
#if defined( USE_CUDA )
    NULL_USE( host_arr );
    ray_gain_struct_free_device_cuda( N, device_arr );
#elif defined( USE_HIP )
    NULL_USE( host_arr );
    ray_gain_struct_free_device_hip( N, device_arr );
#elif defined( USE_OPENACC ) && defined( _OPENACC )