3#include <pulp/signal/detail/modular_sequencing_common.hpp>
41template <
typename SampleType =
float>
75 bool process(
const bool* gates,
int count)
const {
79 for (
int i = 0;
i < count; ++
i) {
81 any = any || gates[
i];
82 parity = parity != gates[
i];
99 return process(ha, hb) ? SampleType{1} : SampleType{0};
Combinational logic on gate signals.
Definition gate_logic.hpp:42
void prepare(double)
Definition gate_logic.hpp:50
GateOp op() const
Definition gate_logic.hpp:53
void set_op(GateOp op)
Definition gate_logic.hpp:52
bool process(const bool *gates, int count) const
N-input form.
Definition gate_logic.hpp:75
static constexpr int latency_samples()
Definition gate_logic.hpp:58
bool process(bool a, bool b) const
Definition gate_logic.hpp:60
static constexpr double kLevelThreshold
Definition gate_logic.hpp:48
SampleType process_levels(SampleType a, SampleType b) const
Level-domain form: thresholds both inputs and returns 0 or 1.
Definition gate_logic.hpp:96
void apply_reset_edge()
Definition gate_logic.hpp:55
void reset()
Definition gate_logic.hpp:56
Definition additive_bank.hpp:218
GateOp
Boolean operation performed by a GateLogicT.
Definition gate_logic.hpp:12
@ logic_or
Definition gate_logic.hpp:14
@ logic_xor
Definition gate_logic.hpp:15
@ logic_xnor
Definition gate_logic.hpp:18
@ logic_nor
Definition gate_logic.hpp:17
@ logic_and
Definition gate_logic.hpp:13
@ logic_nand
Definition gate_logic.hpp:16
constexpr double kTriggerHighThreshold
Definition trigger.hpp:31
@ all
Definition multi_channel_meter.hpp:51
GateLogicT< double > GateLogic64
Definition gate_logic.hpp:107
@ a
Definition formant_filter_bank.hpp:20
@ i
Definition formant_filter_bank.hpp:20
GateLogicT< float > GateLogic
Definition gate_logic.hpp:106