CLRELEASESAMPLER(3clc)

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

✨ 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:

  1. the reference count drops all the way to zero, and
  2. every command queued for execution on the command-queue(s) that use sampler has 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 β€” sampler is 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 Β© 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 129, section 5.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