CLRETAINDEVICE(3clc)

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

✨ NAME ✨

clRetainDevice β€” bestie, it bumps up the device reference count πŸ’–

This is page CLRETAINDEVICE(3clc) from the OpenCL Manual, and yes we're doing this together, hold my hand 🫢


🌸 SYNOPSIS 🌸

cl_int clRetainDevice(cl_device_id device);

πŸ’… NOTES πŸ’…

okay so here's the tea β˜• β€” this one increments the device reference count if device is a valid sub-device that was created by a call to clCreateSubDevices(3clc).

But βœ‹ if device is a root level device β€” like, a cl_device_id you got back from clGetDeviceIDs(3clc) β€” then the device reference count remains unchanged. Not a single number moves. It's giving "nothing to see here" πŸ™ˆ


πŸŽ€ ERRORS πŸŽ€

Returns CL_SUCCESS if the function is executed successfully or if the device is a root-level device. Slay πŸ’–

Otherwise, it returns one of the following errors:

  • CL_INVALID_DEVICE β€” if device is not a valid sub-device created by a call to clCreateSubDevices(3clc). πŸ’€
  • 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 πŸ¦‹

clCreateSubDevices(3clc), clGetDeviceIDs(3clc), clReleaseDevice(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 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 52, section 4.3 - Partitioning a Device

and that's the whole page bestie, no cap ✨ this lil' manual page is brought to you by The Khronos Group, dated 01/14/2021, filed under CLRETAINDEVICE(3clc) β€” go forth and retain those devices responsibly, ily πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from