7 /* Return type of the functions that gather platform info */
8 struct platform_info_ret
11 /* string representation of the value (if any) */
13 /* error representation of the value (if any) */
14 struct _strbuf err_str;
15 /* actual value, when not a string */
21 /* Does this ret need escaping as JSON? */
22 cl_bool needs_escaping;
25 /* Return type of the functions that print device info */
26 struct device_info_ret {
28 /* string representation of the value (if any) */
30 /* error representation of the value (if any) */
31 struct _strbuf err_str;
32 /* actual value, when not a string */
44 cl_device_type devtype;
45 cl_device_mem_cache_type cachetype;
46 cl_device_local_mem_type lmemtype;
47 cl_device_topology_amd devtopo_amd;
48 cl_device_pci_bus_info_khr devtopo_khr;
49 cl_device_scheduling_controls_capabilities_arm sched_controls;
50 cl_device_affinity_domain affinity_domain;
51 cl_device_fp_config fpconfig;
52 cl_command_queue_properties qprop;
53 cl_device_command_buffer_capabilities_khr cmdbufcap;
54 cl_device_exec_capabilities execap;
55 cl_device_svm_capabilities svmcap;
56 cl_device_terminate_capability_khr termcap;
58 /* pointer base for array data or other auxiliary information */
61 cl_context ctx; // associated context
63 /* Does this ret need escaping as JSON? */
64 cl_bool needs_escaping;
67 /* Return type of the functions that gather ICD loader info */
71 /* string representation of the value (if any) */
73 /* error representation of the value (if any) */
74 struct _strbuf err_str;
77 #define RET_BUF(ret) (ret.err ? &ret.err_str : &ret.str)
78 #define RET_BUF_PTR(ret) (ret->err ? &ret->err_str : &ret->str)
79 #define INIT_RET(ret, msg) do { \
80 init_strbuf(&ret.str, msg " info string values"); \
81 init_strbuf(&ret.err_str, msg " info error values"); \
84 #define UNINIT_RET(ret) do { \
85 free_strbuf(&ret.str); \
86 free_strbuf(&ret.err_str); \