[Libclc-dev] [PATCH 0/7] Atomics cleanup and volatile change

Jan Vesely via Libclc-dev libclc-dev at lists.llvm.org
Wed Jun 20 13:34:57 PDT 2018


This series cleans up atomic declarations and implementation.
It also switches 32bit atom_* functions to accept atomic pointers.
The reasoning is included in 7/7 commit message.
I know I've spoken against this change in the past, but all things
considered I leaning towards this being an oversight in the specs.

thanks,
Jan

Jan Vesely (7):
  atomic: Move define cleanup to shared include
  atomic: Cleanup atomic_cmpxchg header
  atom: Consolidate cl_khr_{local,global}_int32_{base,extended}_atomics
    declarations
  atom: Consolidate cl_khr_int64_{base,extended}_atomics declarations
  atomic: Provide function implementation of atomic_{dec,inc}
  atom: Consolidate cl_khr_{local,global}_int32_{base,extended}_atomics
    implementation
  atom: Use volatile pointers for
    cl_khr_{global,local}_int32_{base,extended}_atomics

 generic/include/clc/atom_decl_int32.inc               | 10 ++++++++++
 generic/include/clc/atom_decl_int64.inc               | 11 +++++++++++
 generic/include/clc/atomic/atomic_add.h               |  3 ---
 generic/include/clc/atomic/atomic_and.h               |  3 ---
 generic/include/clc/atomic/atomic_cmpxchg.h           | 19 ++++---------------
 generic/include/clc/atomic/atomic_dec.h               |  5 ++++-
 generic/include/clc/atomic/atomic_decl.inc            |  6 +++++-
 generic/include/clc/atomic/atomic_inc.h               |  5 ++++-
 generic/include/clc/atomic/atomic_max.h               |  3 ---
 generic/include/clc/atomic/atomic_min.h               |  3 ---
 generic/include/clc/atomic/atomic_or.h                |  3 ---
 generic/include/clc/atomic/atomic_sub.h               |  3 ---
 generic/include/clc/atomic/atomic_xchg.h              |  7 +++----
 generic/include/clc/atomic/atomic_xor.h               |  3 ---
 .../clc/cl_khr_global_int32_base_atomics/atom_add.h   |  5 +++--
 .../cl_khr_global_int32_base_atomics/atom_cmpxchg.h   |  4 ++--
 .../clc/cl_khr_global_int32_base_atomics/atom_dec.h   |  4 ++--
 .../clc/cl_khr_global_int32_base_atomics/atom_inc.h   |  4 ++--
 .../clc/cl_khr_global_int32_base_atomics/atom_sub.h   |  5 +++--
 .../clc/cl_khr_global_int32_base_atomics/atom_xchg.h  |  5 +++--
 .../cl_khr_global_int32_extended_atomics/atom_and.h   |  5 +++--
 .../cl_khr_global_int32_extended_atomics/atom_max.h   |  5 +++--
 .../cl_khr_global_int32_extended_atomics/atom_min.h   |  5 +++--
 .../cl_khr_global_int32_extended_atomics/atom_or.h    |  5 +++--
 .../cl_khr_global_int32_extended_atomics/atom_xor.h   |  5 +++--
 .../include/clc/cl_khr_int64_base_atomics/atom_add.h  |  6 ++----
 .../include/clc/cl_khr_int64_base_atomics/atom_sub.h  |  6 ++----
 .../include/clc/cl_khr_int64_base_atomics/atom_xchg.h |  6 ++----
 .../clc/cl_khr_int64_extended_atomics/atom_and.h      |  6 ++----
 .../clc/cl_khr_int64_extended_atomics/atom_max.h      |  6 ++----
 .../clc/cl_khr_int64_extended_atomics/atom_min.h      |  6 ++----
 .../clc/cl_khr_int64_extended_atomics/atom_or.h       |  6 ++----
 .../clc/cl_khr_int64_extended_atomics/atom_xor.h      |  6 ++----
 .../clc/cl_khr_local_int32_base_atomics/atom_add.h    |  5 +++--
 .../cl_khr_local_int32_base_atomics/atom_cmpxchg.h    |  4 ++--
 .../clc/cl_khr_local_int32_base_atomics/atom_dec.h    |  4 ++--
 .../clc/cl_khr_local_int32_base_atomics/atom_inc.h    |  4 ++--
 .../clc/cl_khr_local_int32_base_atomics/atom_sub.h    |  5 +++--
 .../clc/cl_khr_local_int32_base_atomics/atom_xchg.h   |  5 +++--
 .../cl_khr_local_int32_extended_atomics/atom_and.h    |  5 +++--
 .../cl_khr_local_int32_extended_atomics/atom_max.h    |  5 +++--
 .../cl_khr_local_int32_extended_atomics/atom_min.h    |  5 +++--
 .../clc/cl_khr_local_int32_extended_atomics/atom_or.h |  5 +++--
 .../cl_khr_local_int32_extended_atomics/atom_xor.h    |  5 +++--
 generic/lib/SOURCES                                   |  2 ++
 generic/lib/atom_int32_binary.inc                     | 14 ++++++++++++++
 generic/lib/atomic/atomic_dec.cl                      | 12 ++++++++++++
 generic/lib/atomic/atomic_inc.cl                      | 12 ++++++++++++
 .../lib/cl_khr_global_int32_base_atomics/atom_add.cl  | 12 +++---------
 .../cl_khr_global_int32_base_atomics/atom_cmpxchg.cl  |  2 +-
 .../lib/cl_khr_global_int32_base_atomics/atom_dec.cl  |  4 ++--
 .../lib/cl_khr_global_int32_base_atomics/atom_inc.cl  |  4 ++--
 .../lib/cl_khr_global_int32_base_atomics/atom_sub.cl  | 12 +++---------
 .../lib/cl_khr_global_int32_base_atomics/atom_xchg.cl | 12 +++---------
 .../cl_khr_global_int32_extended_atomics/atom_and.cl  | 12 +++---------
 .../cl_khr_global_int32_extended_atomics/atom_max.cl  | 12 +++---------
 .../cl_khr_global_int32_extended_atomics/atom_min.cl  | 12 +++---------
 .../cl_khr_global_int32_extended_atomics/atom_or.cl   | 12 +++---------
 .../cl_khr_global_int32_extended_atomics/atom_xor.cl  | 12 +++---------
 .../lib/cl_khr_local_int32_base_atomics/atom_add.cl   | 12 +++---------
 .../cl_khr_local_int32_base_atomics/atom_cmpxchg.cl   |  2 +-
 .../lib/cl_khr_local_int32_base_atomics/atom_dec.cl   |  4 ++--
 .../lib/cl_khr_local_int32_base_atomics/atom_inc.cl   |  4 ++--
 .../lib/cl_khr_local_int32_base_atomics/atom_sub.cl   | 12 +++---------
 .../lib/cl_khr_local_int32_base_atomics/atom_xchg.cl  | 12 +++---------
 .../cl_khr_local_int32_extended_atomics/atom_and.cl   | 12 +++---------
 .../cl_khr_local_int32_extended_atomics/atom_max.cl   | 12 +++---------
 .../cl_khr_local_int32_extended_atomics/atom_min.cl   | 12 +++---------
 .../cl_khr_local_int32_extended_atomics/atom_or.cl    | 12 +++---------
 .../cl_khr_local_int32_extended_atomics/atom_xor.cl   | 12 +++---------
 70 files changed, 215 insertions(+), 273 deletions(-)
 create mode 100644 generic/include/clc/atom_decl_int32.inc
 create mode 100644 generic/include/clc/atom_decl_int64.inc
 create mode 100644 generic/lib/atom_int32_binary.inc
 create mode 100644 generic/lib/atomic/atomic_dec.cl
 create mode 100644 generic/lib/atomic/atomic_inc.cl

-- 
2.16.4



More information about the Libclc-dev mailing list