CLGETPLATFORMINFO(3clc)
π clGetPlatformInfo β the OpenCL Manual, but make it cute (3clc) π
okay so bestie. welcome to the clGetPlatformInfo(3clc) page, straight out of the OpenCL Manual. this is the one where you go "hey platform, who even ARE you" and it tells you. let's get into it π«Ά
β¨ NAME β¨
clGetPlatformInfo β get specific information about the OpenCL platform.
like. the whole vibe of this function is "tell me about yourself" and honestly? main character energy. πΈ
π SYNOPSIS π
cl_int clGetPlatformInfo(cl_platform_id platform,
cl_platform_info param_name,
size_t param_value_size, void *param_value,
size_t *param_value_size_ret);
no cap, that's the whole signature. five arguments, one cl_int coming back at you. slay. π
π PARAMETERS π
platformβ the platform ID you got back fromclGetPlatformIDs(3clc), or it can beNULL. and ifplatformisNULL?? bestie that behavior is implementation-defined. so like, whatever the implementation decides, that's what happens. we don't make the rules. πparam_nameβ an enumeration constant that says which lil piece of platform info you're asking for. it can be one of the values in the table down below πparam_valueβ a pointer to the memory location where the appropriate values for a givenparam_valueget returned. the possibleparam_valuevalues that come back are listed in the table below. ifparam_valueisNULL, it is ignored. (ghosted. π«₯)param_value_sizeβ specifies the size in bytes of the memory pointed to byparam_value. this size in bytes must be β₯ size of return type specified in the table below. like, don't skimp, okay? πparam_value_size_retβ returns the actual size in bytes of data being queried byparam_value. ifparam_value_size_retisNULL, it is ignored. (also ghosted π)
π OpenCL Platform Queries π
okay this is the table, but the terminal ate the box-drawing characters so we're doing it as a list. every single row is here, promise. π€
CL_PLATFORM_PROFILEβ return typechar[]β OpenCL profile string. returns the profile name supported by the implementation. the profile name returned can be one of the following strings:FULL_PROFILEβ if the implementation supports the OpenCL specification (functionality defined as part of the core specification and does not require any extensions to be supported). it's giving "we do it all, no extras needed" πEMBEDDED_PROFILEβ if the implementation supports the OpenCL embedded profile. the embedded profile is defined to be a subset for each version of OpenCL. lowkey the diet version but make it official. π
CL_PLATFORM_VERSIONβ return typechar[]β OpenCL version string. returns the OpenCL version supported by the implementation. this version string has the following format:
OpenCL<space><major_version.minor_version><space><platform-specific information>
and the major_version.minor_version value returned will be 1.2.
yes, literally 1.2. period included. that's the spec's business, not mine. β¨
CL_PLATFORM_NAMEβ return typechar[]β Platform name string. that's it. that's the whole row. iconic brevity. πCL_PLATFORM_VENDORβ return typechar[]β Platform vendor string. who made it, basically. π·οΈCL_PLATFORM_EXTENSIONSβ return typechar[]β returns a space-separated list of extension names (the extension names themselves do not contain any spaces β important!! don't @ me) supported by the platform. extensions defined here must be supported by all devices associated with this platform. so like, if it's on the list, every device on that platform has to show up for it. no slackers. π€
π NOTES π
a null terminated string is returned by OpenCL query function calls if the return type of the information being queried is a char[].
that's it. that's the note. short king note. π§
π ERRORS π
returns CL_SUCCESS if the function is executed successfully. otherwise, it returns the following:
CL_INVALID_PLATFORMβ ifplatformis not a valid platform. π«CL_INVALID_VALUEβ ifparam_nameis not one of the supported values or if size in bytes specified byparam_value_sizeis less than size of return type andparam_valueis not aNULLvalue.CL_OUT_OF_HOST_MEMORYβ if there is a failure to allocate resources required by the OpenCL implementation on the host. the host said "i have no memory for this rn" π
lowkey pay attention to that second one:param_value_sizetoo small andparam_valueisn'tNULL=CL_INVALID_VALUE. don't try to be slick. π
π SPECIFICATION π
OpenCL Specification[1]
π SEE ALSO π
π AUTHORS π
The Khronos Group
bestie we are NOT done yet β part 2 is coming, so don't go anywhere π
π COPYRIGHT π
Okay bestie, legal era π this is the part where the grown-ups talk, and we do not paraphrase legal text, so here it is in its whole entire glory, character for character, no cap:
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.
Translation for the girlies: free to use, free to remix, free to ship β just keep the notice attached, bestie, that's the whole deal π€β¨
π NOTES π
- OpenCL Specification β page 33, section 4.1 - Querying Platform Info π¦
That's your homework, babe. Go read the spec page, it's literally right there. iykyk π
And that's the whole page, start to finish, no crumbs left behind π This little legend comes to you from The Khronos Group, version stamped 01/14/2021, filed under CLGETPLATFORMINFO(3clc) β go forth and query those platforms, queen ππ
β¨
π¦ 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