CLRETAINPROGRAM(3clc)
CLRETAINPROGRAM(3clc) π
okay bestie, welcome to the OpenCL Manual β yes that OpenCL, the one your GPU is lowkey obsessed with β¨ this page is literally just about bumping a ref count, and honestly? it's giving self-care. let's get into it π«Ά
β¨ NAME β¨
clRetainProgram β increments the program reference count, no cap π
cl_int clRetainProgram(cl_program program);
like. that's it. that's the whole function. you hand it a cl_program and it goes "mine now, keeping it alive" π
π NOTES π
clCreateProgram does an implicit retain. so when you create a program object, it's already been retained for you β the vibes are already immaculate, you don't gotta do it yourself π
π ERRORS π
returns CL_SUCCESS if the function is executed successfully. slay. otherwise it hands you back one of these lil guys:
CL_INVALID_PROGRAMβ ifprogramis not a valid program object. bestie that is not a program, that is a vibe and a prayer πCL_OUT_OF_RESOURCESβ if there is a failure to allocate resources required by the OpenCL implementation on the device.CL_OUT_OF_HOST_MEMORYβ if there is a failure to allocate resources required by the OpenCL implementation on the host.
π SPECIFICATION π
OpenCL Specification[1] β go read it, it's iconic π
π SEE ALSO π
(the last one is literally this page. not me linking you back to yourself π)
πΈ AUTHORS πΈ
The Khronos Group β the main characters fr fr π«Ά
βοΈ 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.
legal text stays legal text bestie, I don't mess with the lawyers π
π NOTES π
- OpenCL Specification β page 136, section 5.6.1 - Creating Program Objects
and that's the whole page, bestie!! π¦ this one came from The Khronos Group, dated 01/14/2021, and it lives under the name CLRETAINPROGRAM(3clc) β go retain something, you absolute legend πβ¨
π¦ 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