GET_GLOBAL_OFFSET(3clc)

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

πŸ’– 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 of dimindx β€” i.e. anything outside that range β€” get_global_offset() returns 0. 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 Β© 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

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