CLRETAINPROGRAM(3clc)

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

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 β€” if program is 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 Β© 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 πŸ“

  1. 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