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)
| 748 | * that themselves declare no kernel. Deliberately excludes weak markers (`dim3`, |
| 749 | * `<<<`) that could plausibly appear in non-CUDA text. */ |
| 750 | function looksLikeCudaSource(source: string): boolean { |
| 751 | return ( |
| 752 | source.indexOf('__global__') !== -1 || |
| 753 | source.indexOf('__device__') !== -1 || |
| 754 | source.indexOf('__constant__') !== -1 || |
| 755 | source.indexOf('cudaStream_t') !== -1 |
| 756 | ); |
| 757 | } |
| 758 | |
| 759 | /** |
| 760 | * Restore preprocessor-directive lines to their original bytes after the |
no outgoing calls
no test coverage detected