ATOMIC_MAX(3clc)
π ATOMIC_MAX(3clc) π
okay bestie, this is a page from the OpenCL Manual and it's about atomic_max β the icon, the moment, the function. let's get into it π«Ά
β¨ NAME β¨
atomic_max β atomic_max functions. yes that's the whole vibe, no notes π
int atomic_max(volatile global(3clc) int *p, int val);
unsigned int atomic_max(volatile global(3clc) unsigned int *p,
unsigned int val);
int atomic_max(volatile local(3clc) int *p, int val);
unsigned int atomic_max(volatile local(3clc) unsigned int *p,
unsigned int val);
πΈ DESCRIPTION πΈ
so here's the tea, bestie β β you read the 32-bit value that's chillin' at the location pointed to by p, and we call that lil guy old. then you compute commonMax(3clc) of (old, val) and store that result right back at the location pointed to by p. and the function returns old. periodt β¨
and ooooh, a 64-bit version of this function exists too β it's called atom_max(3clc), and it's enabled by cl_khr_int64_extended_atomics(3clc). iykyk π
π SPECIFICATION π
OpenCL Specification[1] β she's giving official, she's giving sourced π
π¦ SEE ALSO π¦
π AUTHORS π
The Khronos Group. legends only, fr fr π
π COPYRIGHT π
Copyright Β© 2007-2011 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the following condition: the above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials.
π NOTES π
- OpenCL Specification page 279, section 6.12.11 - Atomic Functions for 32-bit integers
lowkey this one's short and sweet and that's her main character energy β¨ no cap, every single detail is above, don't skip the copyright she's legally required to be here π
okay bye bestie, this page was brought to you by The Khronos Group and dated 01/14/2021 β slay, ate, and left no crumbs πππ¦
π¦ where this page comes from
- ubuntu jammy: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- ubuntu noble: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms