oneapi-src / oneapi-src/oneAPI-samples

identifier "cl_bitfield" is undefined

オープン
#2,764 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug
主要言語
C++
スター
1.2k
フォーク
745
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提供されているCMakeLists.txtからVectorAdd Visual Studioソリューションを生成し、Windows上でvector-add-buffers.cppをコンパイルして、失敗を再現します。次に、cl.hの40~48行付近とインクルード設定を調べ、cl_bitfieldが未定義と報告される理由を特定します。サンプルがこれらの識別子エラーなしでコンパイルできれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cmake, cpp
領域
build-system
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。