Strong content markers for CUDA source in files without a CUDA extension * (headers). The dunders are execution-space specifiers that only nvcc defines; * `cudaStream_t` is the runtime's stream handle, pervasive in launcher headers * that themselves declare no kernel. Deliberately excludes weak m
(source: string)
| 1687 | * that themselves declare no kernel. Deliberately excludes weak markers (`dim3`, |
| 1688 | * `<<<`) that could plausibly appear in non-CUDA text. */ |
| 1689 | function looksLikeCudaSource(source: string): boolean { |
| 1690 | return ( |
| 1691 | source.indexOf('__global__') !== -1 || |
| 1692 | source.indexOf('__device__') !== -1 || |
| 1693 | source.indexOf('__constant__') !== -1 || |
| 1694 | source.indexOf('cudaStream_t') !== -1 |
| 1695 | ); |
| 1696 | } |
| 1697 | |
| 1698 | /** |
| 1699 | * Restore preprocessor-directive lines to their original bytes after the |
no outgoing calls
no test coverage detected