Arthur T Knackerbracket has found the following story:
Under the right circumstances, Gaussian blurring can make an image seem more clearly defined. [DZL] demonstrates exactly this with a lightweight and compact Gaussian interpolation routine to make the low-resolution thermal sensor data display much better on a small OLED.
[...] used an MLX90640 sensor to create a DIY thermal imager with a small OLED display, but since the sensor is relatively low-resolution at 32×24, displaying the data directly looks awfully blocky. Gaussian interpolation to improve the display looks really good, but it turns out that the full Gaussian interpolation isn’t a trivial calculation write on your own. Since [DZL] wanted to implement it on a microcontroller, the lightweight implementation was born. The project page walks through the details of Gaussian interpolation and how some effective shortcuts were made, so be sure to give it a look.
(Score: 2) by FatPhil on Tuesday October 01 2019, @01:09PM (6 children)
void foo(float *a, float *b);
a straightjacket compared to
class foo_doer { void foo(float *a, float *b); };
?
Hmm, should that foo not be static, as it acts independently of any instance's member variables?
And const for that matter - as it doesn't change the instance it pretends to (but doesn't) act on?
He's using *none* of the features that C++ provides that are in any way an improvement over C, he's using a 105-blade swiss army knife to clean poop out from under his fingernails. That's the cumbersome choice, not C.
Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
(Score: 1, Redundant) by Coward, Anonymous on Tuesday October 01 2019, @04:29PM (5 children)
for(int i ...
compiles fine in C++, but not C.
(Score: 0) by Anonymous Coward on Tuesday October 01 2019, @05:58PM (2 children)
for loop declarations like this have been part of standard C for over twenty years now. For comparison the first C++ standard was published in 1998, which included similarly new features such as the standard template library.
I must conclude from your statement that STL code doesn't compile in C++ either, because C++ compilers from the 80s will reject such programs.
(Score: 2, Troll) by Coward, Anonymous on Thursday October 03 2019, @03:25AM (1 child)
Texas Instruments MSP430 and MSP432 compilers (cl430 and armcl) at least make C89 the default for .c files. As far as I'm concerned, C is what compiles without errors on the tools I use, without me having to change options that might break something else. Presumably there is a reason that C99 is not used by default.
(Score: 2) by FatPhil on Thursday October 03 2019, @07:42AM
Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
(Score: 2) by FatPhil on Tuesday October 01 2019, @11:42PM (1 child)
Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
(Score: 2, Flamebait) by Coward, Anonymous on Thursday October 03 2019, @03:27AM
You are the idiot, and probably compile with the special gcc --idiot flag. See my reply to AC above.