[Openmp-commits] [PATCH] D84797: [NFC][OpenMP] Renamed all variable and function names in `target` to conformwith LLVM code standard

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jul 28 14:10:20 PDT 2020


tianshilei1992 marked 3 inline comments as done.
tianshilei1992 added inline comments.


================
Comment at: openmp/libomptarget/src/device.h:202
   /// implementations ignore \p HstPtr.
-  void *data_alloc(int64_t Size, void *HstPtr = nullptr);
+  void *dataAlloc(int64_t Size, void *HstPtr = nullptr);
   /// Deallocates memory which \p TgtPtrBegin points at and returns
----------------
ye-luo wrote:
> "Function names should be verb phrases (as they represent actions), and command-like function should be imperative. The name should be camel case, and start with a lower case letter (e.g. openFile() or isFoo())."
> 
> Since we are anyway changing the names. Let us fix them fully.
> allocData
> deleteData
> Please also take this chance to rename
> data_retrieve
> data_exchange
> as well. No good reason to leave these pains.
I would like to just focus on the functions related to `target` just as the title said. I'll do it in the future if they're still there and I'm gonna touch them.


================
Comment at: openmp/libomptarget/src/private.h:29
+
 extern int target_data_update(DeviceTy &Device, int32_t arg_num,
                               void **args_base, void **args,
----------------
ye-luo wrote:
> Let us kill the pain in one shot. It is just a few more `sed`.
As replied above.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84797/new/

https://reviews.llvm.org/D84797



More information about the Openmp-commits mailing list