MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ validate_multi_channel_data()

template<ComputeData InputType = Kakshya::DataVariant, ComputeData OutputType = InputType>
bool MayaFlux::Yantra::UniversalTransformer< InputType, OutputType >::validate_multi_channel_data ( const std::vector< std::span< double > > &  channels) const
inlineprivate

Validates multi-channel numeric data for NaN/Infinity values.

Parameters
channelsVector of spans representing each channel's data
Returns
true if all channels are valid, false if any contain invalid values

Checks each channel's samples to ensure they are finite numbers. Empty channels are considered valid.

Definition at line 707 of file UniversalTransformer.hpp.

708 {
709 if (channels.empty()) {
710 return false;
711 }
712
713 for (const auto& channel : channels) {
714 if (channel.empty()) {
715 continue;
716 }
717
718 for (double sample : channel) {
719 if (std::isnan(sample)) {
720 return false;
721 }
722 if (std::isinf(sample)) {
723 return false;
724 }
725 }
726 }
727
728 return true;
729 }
uint32_t channels

References channels.

Referenced by MayaFlux::Yantra::UniversalTransformer< InputType, OutputType >::validate_input().

+ Here is the caller graph for this function: