Commit 14038d7
Update example_ctrsm.c to fix cl_platform_id usage in examples
Fixup a failure due to
[ 16%] Building C object CMakeFiles/example_ctrsm.dir/example_ctrsm.c.o
In file included from /usr/include/CL/cl.h:20,
from /usr/include/clBLAS.h:35,
from /tmp/example_ctrsm.c:25:
/usr/include/CL/cl_version.h:22:9: note: '#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)'
22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
| ^~~~~~~
/tmp/example_ctrsm.c: In function 'main':
/tmp/example_ctrsm.c:95:48: error: passing argument 2 of 'clGetPlatformIDs' from incompatible pointer type [-Wincompatible-pointer-types]
95 | err = clGetPlatformIDs(sizeof( platform ), &platform, NULL);
| ^~~~~~~~~
| |
| struct _cl_platform_id ***
/usr/include/CL/cl.h:956:35: note: expected 'struct _cl_platform_id **' but argument is of type 'struct _cl_platform_id ***'
956 | cl_platform_id * platforms,
| ~~~~~~~~~~~~~~~~~^~~~~~~~~
/tmp/example_ctrsm.c:114:5: warning: 'clCreateCommandQueue' is deprecated [-Wdeprecated-declarations]
114 | queue = clCreateCommandQueue(ctx, device, 0, &err);
| ^~~~~
/usr/include/CL/cl.h:1914:1: note: declared here
1914 | clCreateCommandQueue(cl_context context,
| ^~~~~~~~~~~~~~~~~~~~1 parent cf91139 commit 14038d7
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
0 commit comments