CLRETAINSAMPLER(3clc)
π CLRETAINSAMPLER π
okay bestie, welcome to the OpenCL Manual β¨ this one's about clRetainSampler, and it's genuinely so simple you're gonna be like "that's it??" π
β¨ NAME β¨
clRetainSampler β increments the sampler reference count. that's the whole job. she bumps the counter. iconic behavior, no notes π
cl_int clRetainSampler(cl_sampler sampler);
πΈ PARAMETERS πΈ
samplerβ the sampler being retained. like, the one you're giving a lil extra hold on. π«Ά
π¦ NOTES π¦
clCreateSampler(3clc) performs an implicit retain. so yeah, when you make one, you already got a reference on the books β the retain is baked in, no cap β¨
π ERRORS π
Returns CL_SUCCESS if the function is executed successfully. otherwise, bestie, it hands you back one of these:
CL_INVALID_SAMPLERifsampleris not a valid sampler object. (that sampler is not samplering, sorry π)CL_OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.CL_OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
π SPECIFICATION π
OpenCL Specification[1] β
π SEE ALSO π
clCreateSampler(3clc), clGetSamplerInfo(3clc), clReleaseSampler(3clc)
π 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 following condition: the copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.
π NOTES π
- OpenCL Specification page 129, section 5.5.1 - Creating Sampler Objects
okay that's the whole page bestie, go retain some samplers responsibly πβ¨
shoutout to The Khronos Group for writing this, and this lil version is dated 01/14/2021 β you were reading CLRETAINSAMPLER(3clc), slay ππ
π¦ 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