Boost logo

Boost :

Subject: Re: [boost] Current Guidance on Compiler Warnings?
From: Daniela Engert (dani_at_[hidden])
Date: 2018-11-28 17:36:20

Am 28.11.2018 um 17:48 schrieb Peter Dimov via Boost:
> Daniela Engert wrote:
>> I want an *additional* signed integral type with a sane mathematical
>> definition: an abelian group with modulus.
> In what cases would you use this type?

Signal Processing.

For example, a FIR filter requires the widening multiplication N * N ->
2N, followed by a modulo accumulation 2N + 2N -> 2N. This MAC (multiply
and accumulate) step will repeat M times (with M the FIR length). The
accumulation will most likely wrap around multiple times amidst the FIR
calculation an then totally unwrap back into the primary value domain
when the end of the calculation is reached. The output value will then
probably be a shift 2N by K -> N, where K is selected such that the
scaling is correct and takes the SNR gain due to the filtering into
account. There you have the most basic operations in digital signal
processing which simply can't be expressed in a meaningful and efficient
way with current C++ language features. Implementing this stuff in
assembly is much easier than trying to achive this in C++.


Boost list run by bdawes at, gregod at, cpdaniel at, john at