CLICDGETPLATFORMIDSK(3clc)
β¨ CLICDGETPLATFORMIDSK(3clc) β¨
okay so bestie, this page comes straight out of the OpenCL Manual, and it's giving very niche-but-iconic ICD loader energy. no cap. π
πΈ NAME πΈ
clIcdGetPlatformIDsKHR β obtain the list of platforms accessible through the Khronos ICD Loader.
cl_int clIcdGetPlatformIDsKHR(cl_uint num_entries,
cl_platform_id *platforms,
cl_uint *num_platforms);
like, that's the whole vibe. she takes three args and hands you back platforms. periodt. π«Ά
π PARAMETERS π
num_entriesβ the number ofcl_platform_identries that can be added toplatforms. and listen, ifplatformsis notNULL, thennum_entriesmust be greater than zero. that's not a suggestion, that's the rule. πplatformsβ returns a list of OpenCL platforms available for access through the Khronos ICD Loader. thecl_platform_idvalues that come back inplatformsare ICD compatible and can be used to identify a specific OpenCL platform. ifplatformsisNULL, then this argument is just ignored, no hard feelings. also!! the number of OpenCL platforms returned is the minimum of the value you specified innum_entriesor the number of OpenCL platforms actually available. min() behavior, we love to see it. β¨num_platformsβ returns the number of OpenCL platforms available. ifnum_platformsisNULL, then this argument is ignored too. she's chill like that. π¦
π NOTES π
this function is enabled by the cl_khr_icd(3clc) extension. so like, no extension, no function, iykyk. π
π₯ ERRORS π₯
returns CL_SUCCESS if the function is executed successfully. otherwise? she returns one of these:
CL_PLATFORM_NOT_FOUND_KHRif zero platforms are available. zero. none. not a single one. πCL_INVALID_VALUEifnum_entriesis equal to zero andplatformsis notNULL, or if bothnum_platformsandplatformsareNULL.
fr fr, read those two twice. passing nothing and asking for nothing is not the move bestie, she will clock it immediately. π
π SPECIFICATION π
OpenCL Specification[1]
π SEE ALSO π
clGetPlatformIDs(3clc), cl_khr_icd(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 π (the footnote one, stay with me)
- OpenCL Specification page 116, section 9.12.9 - Additions to chapter 4...
mwah π that's the whole page. this lil legend is brought to you by The Khronos Group, stamped 01/14/2021, and filed under CLICDGETPLATFORMIDSK(3clc) in the OpenCL Manual. go get those platforms bestie, you got this πβ¨π¦
π¦ 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