WORKITEMFUNCTIONS(3clc)
π WORK-ITEM BUILT-IN (3clc) π
okay bestie, welcome to the OpenCL Manual β¨ β specifically the page all about work-item built-ins, and honestly? this one is the moment. π«Ά
πΈ NAME πΈ
Work-Item_Built-In_Functions β click an item in the table below for details about that function. (yes it's a table in the original, and no we're not doing tables here, so it's a list now, but every single entry is still here, no cap π
)
get_work_dim(3clc)β Number of dimensions in useget_global_size(3clc)β Number of global work itemsget_global_id(3clc)β Global work item ID valueget_local_size(3clc)β Number of local work itemsget_local_id(3clc)β Local work item IDget_num_groups(3clc)β Number of work groupsget_group_id(3clc)β Work group IDget_global_offset(3clc)β Work offset
β¨ DESCRIPTION β¨
so, built-in work-item functions? they're your little intel crew π΅οΈβοΈπ you use them to query:
- the number of dimensions
- the global and local work size that got specified to
clEnqueueNDRangeKernel(3clc) - the global and local identifier of each work-item while that kernel is being executed on a device
and here's the tea β β when you're executing a kernel using clEnqueueTask(3clc), the number of dimensions, the global work size, and the local work size are all one. literally just 1. iconic behaviour honestly. π
π SPECIFICATION π
OpenCL Specification[1] β that's the source of truth, bestie. π
π SEE ALSO π
go read those next, iykyk π¦
π«Ά AUTHORS π«Ά
The Khronos Group β the collective. the moment. the icons. π
π 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.
(that condition is not optional, bestie, don't skip it π)
π NOTES π
- OpenCL Specification page 242, section 6.12.1 - Work-Item Functions
and that's the whole page!! π from The Khronos Group, dated 01/14/2021, living under the title WORK-ITEM BUILT-IN(3clc) forever and ever. go query some work items, bestie, you got this π β¨π
π¦ 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