Wideband autonomous SDR analysis engine forked from sdr-visual-suite
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

40 lignes
1.3KB

  1. package gpudemod
  2. import "fmt"
  3. func updateShiftedHistory(prev []complex64, shiftedNew []complex64, numTaps int) []complex64 {
  4. need := numTaps - 1
  5. if need <= 0 {
  6. return nil
  7. }
  8. combined := append(append(make([]complex64, 0, len(prev)+len(shiftedNew)), prev...), shiftedNew...)
  9. if len(combined) <= need {
  10. out := make([]complex64, len(combined))
  11. copy(out, combined)
  12. return out
  13. }
  14. out := make([]complex64, need)
  15. copy(out, combined[len(combined)-need:])
  16. return out
  17. }
  18. // StreamingExtractGPU is the planned production entry point for the stateful
  19. // GPU extractor path. It intentionally exists early as an explicit boundary so
  20. // callers can migrate away from legacy overlap+trim semantics.
  21. //
  22. // Current status:
  23. // - validates jobs against persistent per-signal state ownership
  24. // - enforces exact integer decimation
  25. // - initializes per-signal state (config hash, taps, history capacity)
  26. // - does not yet execute the final stateful polyphase GPU kernel path
  27. func (r *BatchRunner) StreamingExtractGPU(iqNew []complex64, jobs []StreamingExtractJob) ([]StreamingExtractResult, error) {
  28. if r == nil || r.eng == nil {
  29. return nil, ErrUnavailable
  30. }
  31. if results, err := r.StreamingExtractGPUExec(iqNew, jobs); err == nil {
  32. return results, nil
  33. }
  34. _, _ = iqNew, jobs
  35. return nil, fmt.Errorf("StreamingExtractGPU not implemented yet: stateful polyphase GPU path pending")
  36. }