CL_KHR_INT64_BASE_AT(3clc)

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

πŸ’– CL_KHR_INT64_BASE_AT πŸ’–

okay bestie, welcome to the OpenCL Manual, page for cl_khr_int64_base_atomics β€” and no, that name is not a typo, it's just a mouthful 🫢


✨ NAME ✨

cl_khr_int64_base_atomics β€” the optional extensions that do atomic operations on 64-bit signed and unsigned integers at locations in __global and __local memory πŸ’…

#pragma OPENCL EXTENSION
cl_khr_int64_base_atomics : enable

πŸ¦‹ DESCRIPTION πŸ¦‹

so if your app wants in on this extension, you literally have to drop this directive into your OpenCL program source:

#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable

no pragma, no atoms. that's the vibe check πŸŽ€

the atomic functions this extension supports are listed below, and every single one of them is performed in one atomic transaction β€” that's the whole point, that's the slay ⭐

these transactions are atomic for the device executing these atomic functions. there is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices. read that twice, bestie, it matters 😭

also, atomic operations on 64-bit integers and 32-bit integers (and float) are atomic w.r.t. each other too. iconic behavior honestly πŸ‘‘

here's the lineup:


πŸ“œ SPECIFICATION πŸ“œ

OpenCL Specification[1] β€” the source of truth, the main character, periodt ✨


πŸ‘€ SEE ALSO πŸ‘€

go read those next, iykyk 🧚


πŸ’œ AUTHORS πŸ’œ

The Khronos Group 🫢


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 condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.


πŸ“ NOTES πŸ“

  1. OpenCL Specification β€” page 10, section 9.3 - 64-bit Atomics πŸ“–

and that's the whole page, bestie πŸ’– this was brought to you by The Khronos Group, dated 01/14/2021, filed under CL_KHR_INT64_BASE_AT(3clc) β€” go forth and atomically vibe πŸŒˆπŸ¦‹πŸŽ€

πŸ“¦ where this page comes from