cl_platform_id 数据结构的内容是什么? [英] what is the content of cl_platform_id data structure?
问题描述
我知道 cl_platform_id
是一种数据结构,如:
I understand that cl_platform_id
is a data structure like:
typedef struct{
foo1 bar1;
foo2 bar2;
...;
}cl_platform_id;
但是这个结构的内容是什么?例如,如果我想将这些内容打印到控制台,我应该使用什么数据类型?
But what are the content of this structure? for example if I want to print these content to the console what data type should I use?
我尝试了整数,但出现错误:
I tried integer but I got the error:
警告:格式指定类型int"但参数具有类型cl_platform_id"(又名struct _cl_platform_id *")[-Wformat]
warning: format specifies type 'int' but the argument has type 'cl_platform_id' (aka 'struct _cl_platform_id *') [-Wformat]
提前感谢您的帮助.
推荐答案
cl_platform_id
是一种抽象(不透明)类型,不能直接使用.相反,使用 clGetPlatformInfo 在您的 cl_platform_id
上.您可以获得可以打印的字符串(如 CL_PLATFORM_NAME
).
The cl_platform_id
is an abstract (opaque) type, it is not intended to be directly used. Instead, query the information that you want to know with clGetPlatformInfo on your cl_platform_id
. You can get strings (like CL_PLATFORM_NAME
) that you can then print.
这篇关于cl_platform_id 数据结构的内容是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!