CLRETAINSAMPLER(3clc)

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

πŸ’– 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_SAMPLER if sampler is not a valid sampler object. (that sampler is not samplering, sorry 😭)
  • 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] ⭐


🌈 SEE ALSO 🌈

clCreateSampler(3clc), clGetSamplerInfo(3clc), clReleaseSampler(3clc)


πŸŽ€ 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 following condition: the 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

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