ATOMIC_MAX(3clc)

πŸ“¦
version 1.0~svn33624 Β· 3 versions
, in ubuntu jammy, ubuntu noble

πŸ’– 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 Β© 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 πŸ“

  1. 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