Skip to content

Commit

Permalink
implement a missing atomicMax
Browse files Browse the repository at this point in the history
  • Loading branch information
pvelesko committed Oct 30, 2024
1 parent 84f0d89 commit 6d49fb3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/hip/devicelib/atomics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ atomicMax(unsigned long long *address, unsigned long long val) {
return __chip_atomic_max_l(address, val);
}

extern "C" __device__ double
__chip_atomic_max_f64(__chip_obfuscated_ptr_t address, double val);

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:1 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:47 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:63 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:1 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:47 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:63 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:1 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:47 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:63 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:1 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:47 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:63 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:1 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:47 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 245 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:245:63 [readability-identifier-naming]

invalid case style for parameter 'val'
extern "C++" inline __device__ double atomicMax(double *address, double val) {

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:39 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:57 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:73 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:39 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:57 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:73 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:39 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:57 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:73 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:39 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:57 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:73 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:39 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:57 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 246 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:246:73 [readability-identifier-naming]

invalid case style for parameter 'val'
return __chip_atomic_max_f64(__chip_obfuscate_ptr(address), val);
}

extern "C" __device__ int __chip_atomic_max_system_i(int *address, int val);

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:27 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:59 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:72 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:27 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:59 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:72 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:27 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:59 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:72 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:27 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:59 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:72 [readability-identifier-naming]

invalid case style for parameter 'val'

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:27 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:59 [readability-identifier-naming]

invalid case style for parameter 'address'

Check warning on line 250 in include/hip/devicelib/atomics.hh

View workflow job for this annotation

GitHub Actions / cpp-linter

include/hip/devicelib/atomics.hh:250:72 [readability-identifier-naming]

invalid case style for parameter 'val'
extern "C++" inline __device__ int atomicMax_system(int *address, int val) {
return __chip_atomic_max_system_i(address, val);
Expand Down

0 comments on commit 6d49fb3

Please sign in to comment.