From bbe1d547ee7e6c5668ef8ad5ec827dbab60aba1a Mon Sep 17 00:00:00 2001 From: Stephane Letz Date: Mon, 11 Dec 2023 15:19:54 +0100 Subject: [PATCH] Documentation. --- compiler/generator/compile.hh | 14 +++++++------- compiler/generator/compile_scal.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/compiler/generator/compile.hh b/compiler/generator/compile.hh index 93d5bbe01d..28eecfa716 100644 --- a/compiler/generator/compile.hh +++ b/compiler/generator/compile.hh @@ -46,13 +46,13 @@ enum class DelayType { kNotADelay = 0, - kZeroDelay, - kMonoDelay, - kSingleDelay, - kCopyDelay, - kDenseDelay, - kMaskRingDelay, - kSelectRingDelay + kZeroDelay, // delay = 0 + kMonoDelay, // 1 sample delay where 1 single variable can be used (the delay appears once in the expression) + kSingleDelay, // 1 sample delay where the delay appears several times in the expression, so a buffer of size 2 is used + kCopyDelay, // longer delay with a cache + kDenseDelay, // longer delay with a cache, only when the read density is high enough + kMaskRingDelay, // sparse delay without cache, using wrapping index (based on a power-of-two size and a mask) + kSelectRingDelay // sparse delay without cache, using wrapping index (based on an if/select) }; std::string nameDelayType(DelayType dt); diff --git a/compiler/generator/compile_scal.cpp b/compiler/generator/compile_scal.cpp index 8bf54dc41f..34d51e6c98 100644 --- a/compiler/generator/compile_scal.cpp +++ b/compiler/generator/compile_scal.cpp @@ -660,7 +660,7 @@ string ScalarCompiler::generateOutput(Tree sig, const string& idx, const string& string ScalarCompiler::generateBinOp(Tree sig, int opcode, Tree arg1, Tree arg2) { return generateCacheCode(sig, subst("($0 $1 $2)", CS(arg1), gBinOpTable[opcode]->fName, CS(arg2))); - } +} /***************************************************************************** Primitive Operations @@ -1209,7 +1209,7 @@ bool ScalarCompiler::isSigSimpleRec(Tree sig) */ DelayType ScalarCompiler::analyzeDelayType(Tree sig) { - Occurrences* occ = fOccMarkup->retrieve(sig); + Occurrences* occ = fOccMarkup->retrieve(sig); faustassert(occ != nullptr); int mxd = occ->getMaxDelay(); int count = occ->getDelayCount();