CLRELEASEKERNEL(3clc)

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

πŸ‘‘ NAME πŸ‘‘

okay so bestie, welcome to the OpenCL Manual, 3clc edition, and today's main character is clReleaseKernel β€” she decrements the kernel reference count. that's it, that's the job πŸ’…

cl_int clReleaseKernel(cl_kernel kernel);

that's the whole signature, she's lowkey tiny but highkey important πŸŽ€


🫢 NOTES 🫢

so here's the tea: the kernel object gets deleted once the number of instances that are retained to kernel become zero, and the kernel object is no longer needed by any enqueued commands that use kernel.

like. both conditions. she's not leaving the party until everyone who's holding onto her has let go AND the queued commands are done with her. main character exit, fr fr ✨


πŸ’€ ERRORS πŸ’€

Returns CL_SUCCESS if the kernel objects are successfully alloctaed. (yes, "alloctaed" β€” that's the manpage's spelling, not mine, we're keeping it, it's iconic in a cursed way πŸ“)

Otherwise? it returns one of the following errors, and none of them are cute:

  • CL_INVALID_KERNEL β€” if kernel is not a valid kernel object. not a real kernel, bestie, vibe check failed πŸ™ˆ
  • CL_OUT_OF_RESOURCES β€” if there is a failure to allocate resources required by the OpenCL implementation on the device. the device ran out, she's struggling 😭
  • CL_OUT_OF_HOST_MEMORY β€” if there is a failure to allocate resources required by the OpenCL implementation on the host. and this one is the host running out. double oof, no cap πŸ’€

πŸ“œ SPECIFICATION πŸ“œ

OpenCL Specification[1] β€” go read her, she's the blueprint ⭐


πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, go say hi:


πŸ’œ AUTHORS πŸ’œ

The Khronos Group β€” kings, honestly πŸ‘‘


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 159, section 5.7.1 - Creating Kernel Objects β€” that's where the lore lives, iykyk πŸ“–βœ¨

and that's the whole page, bestie!! πŸ’– this was the OpenCL Manual, brought to you by The Khronos Group, dated 01/14/2021, filed under CLRELEASEKERNEL(3clc) β€” now go release your kernels responsibly, love u, bye πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from