MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / looksLikeCudaSource

Function looksLikeCudaSource

src/extraction/languages/c-cpp.ts:750–757  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

748 * that themselves declare no kernel. Deliberately excludes weak markers (`dim3`,
749 * `<<<`) that could plausibly appear in non-CUDA text. */
750function 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

Callers 2

preParseCppSourceFunction · 0.85
preParseCSourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected