CLRETAINDEVICE(3clc)
β¨ 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β ifdeviceis not a valid sub-device created by a call toclCreateSubDevices(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 π
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 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
- 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