<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/111023>111023</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang][OpenMP][CUDA] Preprocessor symbol _OPENMP not defined for CUDA
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bradking
</td>
</tr>
</table>
<pre>
According to Clang's [OpenMP Support](https://clang.llvm.org/docs/OpenMPSupport.html) documentation there is some support for OpenMP with CUDA. However, I've observed that the `_OPENMP` macro is not defined:
```console
$ clang++ --version
clang version 19.1.1 (https://github.com/llvm/llvm-project d401987fe349a87c53fe25829215b080b70c0c1a)
...
$ cat test.cxx
_OPENMP
$ clang++ -x c++ -E test.cxx -fopenmp=libomp | tail -1
202011
$ clang++ -x cu -E test.cxx -fopenmp=libomp | tail -1
_OPENMP
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8FupDgQ_RpzKTWyC2jDgUO6O63dQzYtrfa8MqYAzwBGtukkfz-ioTPJzGEUCYEpVz3XK7-nvDftSFSy7MCyU6Tm0FlXVk7V383YRpWt38oHra2rzdhCsHDs1dgylB5YdnieaHy6wL_zNFkXWHZimHchTJ4lDwzPDM96SY_7_jrE1rUMz7XVnuF5rdwK4y4MPcMCaqvngcaggrEjhI4cgfHg7UDg11xorIPt3BcTOjj-d3qIAf6yL3Qlx_AIfzOUVwJbeXJXqiF0KixgwPb8_-fL4z9PF7bnMCjt7AI_2gA1NWakeumbnxi_v_d8fbQdve1pi2IKeh3DgeEBdrsrOW_suG7ftmALgShiEQv4bTCtCd1cxdoODM_LfLbPbnL2G-kAdcpFkcuGkrRQudRZ0hBmORYosornvJJccy0Uw2I9N47jT70vXS7EyYdYv76u0Tv_XxM_0nkFfV8-vpfDrrETjcPEklNvKjtMwOQRgjI97MSKhBy5EH_CnuGruJ-bvt_J-hvVZVIXSaEiKoVEWchU5jLqyr1stMpzzDGrtCSSqlZZKkS-z4mKrIpMiRxTwXki9lmRyrjaV02airRp8iLDQrGU06BM_y7fyHg_UymE4JhEvaqo9zfnIG4kcTGRK28XWc2tZynvjQ_-J0Qwob_ZbTVSdnq30bpe5MyyE1wcTc5q8t468G9DZXvY5vBRsDc7LDXR7PryaxJjeL4RWvy4cbqW-CMAAP__nKQ6SA">