Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::gpu_audio::GpuWaveNetRealtimeNode Class Referenceabstract

#include <gpu_wavenet_realtime_node.hpp>

Classes

struct  Config

Public Member Functions

 GpuWaveNetRealtimeNode (const Config &)
 Copies all descriptors, dilation arrays and weights. Host thread only.
 ~GpuWaveNetRealtimeNode () override
 Stop/join callback and worker first; destruction releases and closes the trace generation as release() does.
 GpuWaveNetRealtimeNode (const GpuWaveNetRealtimeNode &)=delete
GpuWaveNetRealtimeNode & operator= (const GpuWaveNetRealtimeNode &)=delete
GpuAudioNodeDescriptor descriptor () const override
bool prepare () override
 Stop/join callback and worker first: prepare() begins with release().
bool configure_trace (const GpuWaveNetTraceConfig &) noexcept
 Host-only, before prepare.
bool release () noexcept
 Stop/join callback and worker first. False retains provider owners for retry.
bool release_bounded (std::uint64_t budget_ns) noexcept override
 release() within budget_ns per call: a provider that cannot drain in time abandons to quarantine (its device is destroyed, its memory stays owned) and this returns false.
bool fenced () const noexcept
 Diagnostic snapshot: true before preparation or after delivery was fenced.
GpuAudioRecoveryReason recovery_reason () const noexcept
 First latched recovery cause, if the shared-I/O path has fenced.
std::uint64_t recovery_sequence () const noexcept
 Sequence associated with the first latched recovery cause, or UINT64_MAX.
std::uint64_t sanitized_input_samples () const noexcept
 Non-finite input samples (NaN, +/-Inf) replaced with zero before GPU submission since prepare().
GpuAudioStatus status_snapshot () const noexcept override
 Allocation-free provider-neutral lifecycle projection for hosts that own this stamped node directly.
bool bind_realtime_path (detail::RealtimeGpuNodeBinding &binding) noexcept override
 Private transport hook, not for node authors: a node that the GPU audio transport drives through a stamped realtime path describes that path here.
void process_block (const audio::BufferView< const float > &, audio::BufferView< float > &, std::uint32_t) final
 Not a legacy FIFO node. GpuAudioTransport rejects an unprepared instance.
virtual bool cpu_fallback_prepared () const noexcept
 Host-thread witness that the realtime CPU fallback is already built before prepare() returns.
virtual void process_block (const audio::BufferView< const float > &input, audio::BufferView< float > &output, uint32_t n)=0
 Non-RT worker context. Process exactly one block (n == block_size).
virtual void prime_fallback (const audio::BufferView< const float > &, uint32_t) noexcept
 RT-safe.
virtual void process_cpu_fallback (const audio::BufferView< const float > &input, audio::BufferView< float > &output, uint32_t n) noexcept
 RT-safe fallback.

Friends

struct detail::WaveNetRealtimeTestAccess

Constructor & Destructor Documentation

◆ GpuWaveNetRealtimeNode() [1/2]

pulp::gpu_audio::GpuWaveNetRealtimeNode::GpuWaveNetRealtimeNode ( const Config & )
explicit

Copies all descriptors, dilation arrays and weights. Host thread only.

◆ ~GpuWaveNetRealtimeNode()

pulp::gpu_audio::GpuWaveNetRealtimeNode::~GpuWaveNetRealtimeNode ( )
override

Stop/join callback and worker first; destruction releases and closes the trace generation as release() does.

◆ GpuWaveNetRealtimeNode() [2/2]

pulp::gpu_audio::GpuWaveNetRealtimeNode::GpuWaveNetRealtimeNode ( const GpuWaveNetRealtimeNode & )
delete

Member Function Documentation

◆ bind_realtime_path()

bool pulp::gpu_audio::GpuWaveNetRealtimeNode::bind_realtime_path ( detail::RealtimeGpuNodeBinding & )
overridevirtualnoexcept

Private transport hook, not for node authors: a node that the GPU audio transport drives through a stamped realtime path describes that path here.

Returns false for a node the transport drives through its staged worker path, which is the default.

Reimplemented from pulp::gpu_audio::GpuAudioNode.

◆ configure_trace()

bool pulp::gpu_audio::GpuWaveNetRealtimeNode::configure_trace ( const GpuWaveNetTraceConfig & )
noexcept

Host-only, before prepare.

The sole transport worker drains bounded records; quiescent release closes the generation. No callback logging.

◆ cpu_fallback_prepared()

virtual bool pulp::gpu_audio::GpuAudioNode::cpu_fallback_prepared ( ) const
inlinevirtualnoexceptinherited

Host-thread witness that the realtime CPU fallback is already built before prepare() returns.

A descriptor's supports_cpu_fallback bit is only a declaration; the transport admits MissPolicy::CpuFallback after both the declaration and this prepared witness are true. Nodes with no verified fallback remain fail-closed and must use silence on a miss.

Reimplemented in pulp::gpu_audio::GpuConvolver, and pulp::gpu_audio::GpuNeuralRealtimeNode.

◆ descriptor()

GpuAudioNodeDescriptor pulp::gpu_audio::GpuWaveNetRealtimeNode::descriptor ( ) const
overridevirtual

◆ fenced()

bool pulp::gpu_audio::GpuWaveNetRealtimeNode::fenced ( ) const
noexcept

Diagnostic snapshot: true before preparation or after delivery was fenced.

This is not a completion count or a guarantee about the next callback.

◆ operator=()

GpuWaveNetRealtimeNode & pulp::gpu_audio::GpuWaveNetRealtimeNode::operator= ( const GpuWaveNetRealtimeNode & )
delete

◆ prepare()

bool pulp::gpu_audio::GpuWaveNetRealtimeNode::prepare ( )
overridevirtual

Stop/join callback and worker first: prepare() begins with release().

Implements pulp::gpu_audio::GpuAudioNode.

◆ prime_fallback()

virtual void pulp::gpu_audio::GpuAudioNode::prime_fallback ( const audio::BufferView< const float > & ,
uint32_t  )
inlinevirtualnoexceptinherited

RT-safe.

Called by the transport on EVERY block (not just misses) for a CpuFallback node, BEFORE the output-ring read, so the node's CPU fallback can be kept continuously fed and its convolution history is always current the moment a miss makes it take over. A node whose fallback needs no live priming (the default) does nothing. MUST NOT allocate, lock, or block.

Reimplemented in pulp::gpu_audio::GpuConvolver.

◆ process_block() [1/2]

virtual void pulp::gpu_audio::GpuAudioNode::process_block ( const audio::BufferView< const float > & input,
audio::BufferView< float > & output,
uint32_t n )
pure virtualinherited

Non-RT worker context. Process exactly one block (n == block_size).

Implemented in pulp::gpu_audio::GpuConvolver, and pulp::gpu_audio::GpuMultiConvolver.

◆ process_block() [2/2]

void pulp::gpu_audio::GpuWaveNetRealtimeNode::process_block ( const audio::BufferView< const float > & ,
audio::BufferView< float > & ,
std::uint32_t  )
final

Not a legacy FIFO node. GpuAudioTransport rejects an unprepared instance.

◆ process_cpu_fallback()

virtual void pulp::gpu_audio::GpuAudioNode::process_cpu_fallback ( const audio::BufferView< const float > & input,
audio::BufferView< float > & output,
uint32_t n )
inlinevirtualnoexceptinherited

RT-safe fallback.

MUST NOT allocate, lock, or block — it runs on the audio thread for the CpuFallback miss policy (hence noexcept). The default copies the current dry input to the output. The transport's output is delayed by latency_blocks, so that dry block breaks the timeline; it is not a safe fallback. A CpuFallback node should override this with a primed, latency-aligned fallback, or declare Silence. When paired with prime_fallback(), this emits the latency-aligned block the continuously-fed fallback has already computed.

Reimplemented in pulp::gpu_audio::GpuConvolver, and pulp::gpu_audio::GpuMultiConvolver.

◆ recovery_reason()

GpuAudioRecoveryReason pulp::gpu_audio::GpuWaveNetRealtimeNode::recovery_reason ( ) const
noexcept

First latched recovery cause, if the shared-I/O path has fenced.

◆ recovery_sequence()

std::uint64_t pulp::gpu_audio::GpuWaveNetRealtimeNode::recovery_sequence ( ) const
noexcept

Sequence associated with the first latched recovery cause, or UINT64_MAX.

◆ release()

bool pulp::gpu_audio::GpuWaveNetRealtimeNode::release ( )
noexcept

Stop/join callback and worker first. False retains provider owners for retry.

◆ release_bounded()

bool pulp::gpu_audio::GpuWaveNetRealtimeNode::release_bounded ( std::uint64_t budget_ns)
overridevirtualnoexcept

release() within budget_ns per call: a provider that cannot drain in time abandons to quarantine (its device is destroyed, its memory stays owned) and this returns false.

The node keeps ownership on false, and the host must still call release() later to complete it.

Reimplemented from pulp::gpu_audio::GpuAudioNode.

◆ sanitized_input_samples()

std::uint64_t pulp::gpu_audio::GpuWaveNetRealtimeNode::sanitized_input_samples ( ) const
noexcept

Non-finite input samples (NaN, +/-Inf) replaced with zero before GPU submission since prepare().

A dilated causal stack would otherwise carry one bad sample through its whole receptive field. Counted, not latched: the status stays Ready.

◆ status_snapshot()

GpuAudioStatus pulp::gpu_audio::GpuWaveNetRealtimeNode::status_snapshot ( ) const
overridevirtualnoexcept

Allocation-free provider-neutral lifecycle projection for hosts that own this stamped node directly.

Reimplemented from pulp::gpu_audio::GpuAudioNode.

◆ detail::WaveNetRealtimeTestAccess

friend struct detail::WaveNetRealtimeTestAccess
friend

The documentation for this class was generated from the following file: