Wideband autonomous SDR analysis engine forked from sdr-visual-suite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1012B

  1. package gpudemod
  2. // StreamingExtractGPUExec is the internal execution selector for the new
  3. // production-path semantics. It intentionally keeps the public API stable while
  4. // allowing the implementation to evolve from host-side oracle execution toward
  5. // a real GPU polyphase path.
  6. func (r *BatchRunner) StreamingExtractGPUExec(iqNew []complex64, jobs []StreamingExtractJob) ([]StreamingExtractResult, error) {
  7. invocations, err := r.buildStreamingGPUInvocations(iqNew, jobs)
  8. if err != nil {
  9. return nil, err
  10. }
  11. if useGPUNativePreparedExecution {
  12. execResults, err := r.executeStreamingGPUNativePrepared(invocations)
  13. if err == nil {
  14. return r.applyStreamingGPUExecutionResults(execResults), nil
  15. }
  16. if !useGPUHostOracleExecution {
  17. return nil, err
  18. }
  19. }
  20. if useGPUHostOracleExecution {
  21. execResults, err := r.executeStreamingGPUHostOraclePrepared(invocations)
  22. if err != nil {
  23. return nil, err
  24. }
  25. return r.applyStreamingGPUExecutionResults(execResults), nil
  26. }
  27. return nil, ErrUnavailable
  28. }