CLRELEASESAMPLER(3clc)
β¨ CLRELEASESAMPLER β¨
okay bestie, welcome to the OpenCL Manual π you're reading the page for clReleaseSampler from 3clc, and honestly? it's a short one but it's IMPORTANT, so let's go π«Ά
πΈ NAME πΈ
clReleaseSampler β the way it decrements the sampler reference count π
π¦ SYNOPSIS π¦
cl_int clReleaseSampler(cl_sampler sampler);
that's it. that's the whole vibe check. one function, one arg, one cl_int coming back at you β¨
π PARAMETERS π
samplerβ the sampler you're releasing. (the original text says "specifies the sampler being retained," which is lowkey a typo in the source but we're keeping it fr fr, no cap π)
π NOTES π
okay so here's the tea β the sampler object gets deleted once two things have happened:
- the reference count drops all the way to zero, and
- every command queued for execution on the command-queue(s) that use
samplerhas finished π
so like, don't panic if it's still hanging around for a sec β it's just waiting for its moment, main character energy π
π₯ ERRORS π₯
returns CL_SUCCESS when everything goes off without a hitch β¨ otherwise it hits you with one of these:
CL_INVALID_SAMPLERβsampleris not a valid sampler object. it's giving "who is she" πCL_OUT_OF_RESOURCESβ the OpenCL implementation on the device failed to allocate the resources it needed πCL_OUT_OF_HOST_MEMORYβ the OpenCL implementation on the host failed to allocate the resources it needed π
not me manifesting CL_SUCCESS for you every single time π―οΈ
π SPECIFICATION π
OpenCL Specification[1] π
β SEE ALSO β
the whole sampler friend group π«Ά go read them too, iykyk
π 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 condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.
π NOTES π
OpenCL Specificationpage129, section5.5.1 - Creating Sampler Objectsπ
and that's the whole page bestie!! π brought to you by The Khronos Group, dated 01/14/2021, on the CLRELEASESAMPLER(3clc) page π
go forth and release your samplers responsibly, mwah π
π¦ 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