GET_GLOBAL_SIZE(3clc)
π GET_GLOBAL_SIZE π (that's get_global_size, from the 3clc manual, bestie)
okay so. you're in a kernel, you need to know how big your global party is, and this lil function is THE one to ask. π
size_t get_global_size(uint dimindx);
β¨ NAME β¨
get_global_size β literally hands you back the number of global work-items that were specified for the dimension identified by dimindx. no cap. π
πΈ SYNOPSIS πΈ
size_t get_global_size(uint dimindx);
π DESCRIPTION π
So the way that this works: the value you get back is the one given by the global_work_size argument you passed to clEnqueueNDRangeKernel(3clc). that's the whole vibe. π¦
Now for dimindx β the valid values are 0 up to get_work_dim(3clc)() - 1. periodt. π
And if you go and pass some other value of dimindx? bestie, it just returns 1. that's it, that's the whole behaviour. π
Also, for clEnqueueTask(3clc), this always returns 1. always. every time. iconic. β¨
π SPECIFICATION π
OpenCL Specification[1] π«Ά
π SEE ALSO π
π«Ά AUTHORS π«Ά
The Khronos Group β yeah, they made this whole thing. legends only. π
βοΈ COPYRIGHT βοΈ
okay so this part is the legal text and I am NOT touching a single character of it, so here it is, verbatim, because that's the whole point of a copyright notice:
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 π
- OpenCL Specification β page 242, section 6.12.1 - Work-Item Functions. π
and that's the page!! π it's The Khronos Group's work, dated 01/14/2021, and it lives in the GET_GLOBAL_SIZE(3clc) corner of the OpenCL manual. go get those work-items, bestie, you ate. πβ¨ππ¦πΈπ
π¦ 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