oneapi-src / oneapi-src/oneAPI-samples
identifier "cl_bitfield" is undefined
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 1.2k
- Fork
- 745
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Summary
I got the above error when I tried to compile "vector-add-buffers.cpp" from the openmp-samples.
Version
2026.1
Environment
Windows
Steps to reproduce
Produce a Visual Studio solution with the supplied CMakeLists.txt of VectorAdd, and try to compile (inside Visual Studio).
Observed behavior
A lot of lines of the type: "identifier "cl_bitfield" is undefined" in cl.h. The first undefined is at cl.h line no. 48.
This is puzzling because cl.h contains the following lines:
40 typedef cl_ulong cl_bitfield;
typedef cl_ulong cl_properties;
typedef cl_bitfield cl_device_type;
typedef cl_uint cl_platform_info;
typedef cl_uint cl_device_info;
typedef cl_bitfield cl_device_fp_config;
typedef cl_uint cl_device_mem_cache_type;
typedef cl_uint cl_device_local_mem_type;
48 typedef cl_bitfield cl_device_exec_capabilities;
That is, "cl_bitfield" is defined before it is used.
Expected behavior
Document behavior you expect.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện lỗi bằng cách tạo solution VectorAdd Visual Studio từ CMakeLists.txt được cung cấp và biên dịch vector-add-buffers.cpp trên Windows. Sau đó kiểm tra cl.h quanh các dòng 40–48 và cấu hình include để xác định lý do cl_bitfield được báo là chưa được định nghĩa. Hoàn tất khi sample biên dịch mà không có các lỗi định danh này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cmake, cpp
- Lĩnh vực
- build-system
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 45/100