GET_LOCAL_SIZE(3clc)

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

πŸ’– GET_LOCAL_SIZE πŸ’–

okay so bestie, this is a page from the OpenCL Manual (yes, the 3clc one) and it's literally about asking your kernel "hey, how many of us are in this dimension?" 🫢


✨ NAME ✨

get_local_size β€” returns the number of local work-items πŸ’…

size_t get_local_size(uint dimindx);

🌸 DESCRIPTION 🌸

So like, this function returns the number of local work-items specified in the dimension identified by dimindx. No cap. πŸŽ€

Where does that number even come from? It's given by the local_work_size argument to clEnqueueNDRangeKernel(3clc) β€” if local_work_size is not NULL. But if it is NULL, then the OpenCL implementation itself picks an appropriate local_work_size value, and that's the value this function hands back to you. The implementation is the main character and it decides. πŸ‘‘

Valid values of dimindx are 0 to get_work_dim(3clc)() - 1. For other values of dimindx, get_local_size() returns 1. Periodt. πŸ’€

And for clEnqueueTask(3clc), this always returns 1. Every single time. Iconic consistency fr fr. ⭐


πŸ“œ SPECIFICATION πŸ“œ

OpenCL Specification[1] 🌈


πŸ‘€ SEE ALSO πŸ‘€

go read those too bestie, they're all in the same little friend group πŸ¦‹


🫢 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 242, section 6.12.1 - Work-Item Functions

ok that's the whole page, no skips, no summarising, we ate that πŸ“

and that's a wrap on GET_LOCAL_SIZE(3clc) from The Khronos Group, dated 01/14/2021 β€” mwah, take care of her πŸ’œβœ¨

πŸ“¦ where this page comes from