GET_GLOBAL_OFFSET(3clc)
π NAME π
get_global_offset β bestie, she literally hands you back the offset values that were specified in the global_work_offset argument of clEnqueueNDRangeKernel. That is the whole entire job. No cap.
size_t get_global_offset(uint dimindx);
πΈ DESCRIPTION πΈ
Okay so here's the tea. get_global_offset() returns the offset values that were specified in the global_work_offset argument to clEnqueueNDRangeKernel(3clc). Like, you gave the kernel an offset, and now you want it back? She's got you. π«Ά
The valid values of dimindx are 0 to get_work_dim(3clc)() - 1. Yes, that's a function call sitting inside a range expression, she's extra like that and we love her for it. π
For other values ofdimindxβ i.e. anything outside that range βget_global_offset()returns0. Just zero. That's it. That's the answer.
And for clEnqueueTask(3clc), this returns 0. Periodt. β¨
π SPECIFICATION π
OpenCL Specification[1]
π SEE ALSO π
π«Ά AUTHORS π«Ά
The Khronos Group
Β©οΈ 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 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 whole page, bestie! This little masterpiece came from The Khronos Group, dated 01/14/2021, and if you ever need to look it up again the magic words are GET_GLOBAL_OFFSET(3clc). π¦ππ
π¦ 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