CLICDGETPLATFORMIDSK(3clc)

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

✨ 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 of cl_platform_id entries that can be added to platforms. and listen, if platforms is not NULL, then num_entries must 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. the cl_platform_id values that come back in platforms are ICD compatible and can be used to identify a specific OpenCL platform. if platforms is NULL, then this argument is just ignored, no hard feelings. also!! the number of OpenCL platforms returned is the minimum of the value you specified in num_entries or the number of OpenCL platforms actually available. min() behavior, we love to see it. ✨
  • num_platforms β€” returns the number of OpenCL platforms available. if num_platforms is NULL, 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_KHR if zero platforms are available. zero. none. not a single one. 😭
  • CL_INVALID_VALUE if num_entries is equal to zero and platforms is not NULL, or if both num_platforms and platforms are NULL.
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 Β© 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)

  1. 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