[Openmp-commits] [PATCH] D14031: [OpenMP] Initial implementation of OpenMP offloading library - libomptarget.

Hervé Yviquel via Openmp-commits openmp-commits at lists.llvm.org
Fri Sep 30 09:57:07 PDT 2016

hyviquel added inline comments.

> omptarget.cpp:929
> +  // Move data to device.
> +  target_data_begin(Device, arg_num, args_base, args, arg_sizes, arg_types);
> +

Why the offloading is continuing if the mapping of data already failed... 
`target_data_begin` could return `OFFLOAD_FAIL` or `OFFLOAD_SUCCESS` to allow the offloading to stop earlier

> omptarget.cpp:980
> +  // Move data from device.
> +  target_data_end(Device, arg_num, args_base, args, arg_sizes, arg_types);
> +  return OFFLOAD_SUCCESS;

you return OFFLOAD_SUCCESS even if something went wrong in `target_data_end`


More information about the Openmp-commits mailing list