diff --git a/internal/demod/gpudemod/gpudemod.go b/internal/demod/gpudemod/gpudemod.go index 632b411..a5e6d72 100644 --- a/internal/demod/gpudemod/gpudemod.go +++ b/internal/demod/gpudemod/gpudemod.go @@ -70,10 +70,12 @@ func (e *Engine) Demod(iq []complex64, offsetHz float64, bw float64, mode DemodT return nil, 0, errors.New("CUDA demod phase 1 currently supports NFM only") } - // Phase 1 conservative scaffold: - // Keep build/tag/CUDA-specific package boundaries now, but use the existing - // CPU DSP implementation as the processing backend until the actual CUDA - // kernels are introduced in later phases. + // Phase 1b note: + // This package now performs real CUDA availability gating and keeps the + // runtime/CGO boundary in place, but still intentionally falls back to the + // existing CPU DSP math for signal processing. The next phase should replace + // the FreqShift + FM discriminator sections below with actual kernel launches. + _ = fmt.Sprintf("%s:%0.3f", phaseStatus(), offsetHz) shifted := dsp.FreqShift(iq, e.sampleRate, offsetHz) cutoff := bw / 2 if cutoff < 200 { diff --git a/internal/demod/gpudemod/gpudemod_test.go b/internal/demod/gpudemod/gpudemod_test.go index 1725923..dd90763 100644 --- a/internal/demod/gpudemod/gpudemod_test.go +++ b/internal/demod/gpudemod/gpudemod_test.go @@ -7,3 +7,9 @@ func TestStubAvailableFalseWithoutCufft(t *testing.T) { t.Fatal("expected CUDA demod to be unavailable without cufft build tag") } } + +func TestStubNewReturnsErrorWithoutCufft(t *testing.T) { + if _, err := New(4096, 2048000); err == nil { + t.Fatal("expected New to fail without cufft build tag") + } +}