(And cute: it spins when I click it. Blech.)
2,653 karma · joined September 22, 2013
andrew at $DOMAIN
(And cute: it spins when I click it. Blech.)
Monopsony!
See here, for an example: https://imagemagick.org/script/clahe.php
If only 20% of the content gets changed, the rolling hash that Borg does to chunk files could identify the 80% common parts and then with its deduplication it would store just a single compressed copy of those chunks. And as a bonus, it's designed for handling historical data.
int sign_extend(int val_11b) {
struct { int v : 11; } t = { val_11b };
return t.v;
}
in Compiler Explorer produces pretty much the same x86-64 assembly as the first function in the post (the shift left, then shift right version) under GCC, Clang, and MSVC when optimizations are turned on.https://godbolt.org/z/d3Kf9fsE6
(But I do love that xor variant; that's really clever and clean.)
I notice that the destroyed house next to it seems to have been made of the typical light timber frame and regular glass windows.
By comparison, my parents' house in Puerto Rico isn't dome-shaped -- it's rather boxy, but it is constructed with fairly thick concrete walls on the exterior and has hurricane shutters over all the windows. The biggest problem that it's ever had from hurricanes (e.g., Hurricane Maria) has been from flooding and extended loss of power rather than anything structural.
Don't forget that these days, it's all going through some ML-based denoiser, anyway. I wouldn't be surprised if filter choice is nearly irrelevant at this point (except for training).
Essentially it uses a truncated isotropic (non-separable) Gaussian defined by exp(-2.0 * (x*x + y*y)) with a 2x2 pixel support [3], which is slightly soft and completely avoids ringing.
Gaussian also plays very nicely with filtered importance sampling [4] since it has no negative lobes.
(Though I remember a number of studios using RenderMan preferring filters with a bit of sharpening.)
[1] https://paulbourke.net/dataformats/rib/RISpec3_2.pdf#page=40
[2] https://rmanwiki-26.pixar.com/space/REN26/19661819/Filtering
[3] https://paulbourke.net/dataformats/rib/RISpec3_2.pdf#page=20...
[4] https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&d...
(American here, but that's one I've come across before.)
- You can flip a block horizontally, left-to-right, by negating the DCT coefficients in the odd-numbered columns (zero-indexed).
- You can flip a block vertically, top-to-bottom, by negating the DCT coefficients in the odd-numbered rows (zero-indexed).
- You can transpose a block by transposing the DCT coefficients.
In combination, that's enough to rotate a block in 90 degree increments, and to do so losslessly/reversibly without harming the original quantization (you don't even need to do an IDCT). Then you swap the blocks around to the right order and redo the lossless entropy encoding stages.
1. Are able to diagnose the problems remotely at such distances and on such old hardware. How can they even measure the thruster tube apertures here?
2. Decide what actions to take. It's not like they have a local test device to experiment on is it? (Even if they did I can't imagine how they'd reproduce the conditions of the real thing.) And if they choose poorly, I'd assume the mission's over. There's no replacing Voyager 1 if they brick it.
3. Have such fine control over the hardware. For something built in the 70's when RAM was largely measured in kB, they seem to have an insane amount of flexibility to remotely reconfigure the equipment. Whatever they did, there must have been some real foresight.
But being able to grep is really nice when trying to figure out something out about a source tree that I don't yet have set up to compile, nor am I a developer of. I.e., I've downloaded the source for a tool I've been using pre-built binaries of and am now trying to trace why I might be getting a particular error.
Flush to zero (FTZ) is the usual term for this.
Later, it was expanded by James Hendrix into a full book with a more complete implementation. [2] (As a kid, coming across this book in the bargain bin at CompUSA was what led to me learning C. I still have my copy!)
[1] https://archive.org/details/dr_dobbs_journal_vol_05_201803/p...
[2] https://www.amazon.com/Small-Compiler-Language-Theory-Design...
Given that, and that I'm most comfortable developing on Linux and in C++, does anyone have a good toolchain recommendation for cross compiling C++ to Windows from Linux? (Ideally something that I can point CMake at and get a build that I can test in Proton.)
For example, here's a simple Compiler Explorer link with a simple loop conditionally copying from one of two values:
https://godbolt.org/z/TbeK99sx1.
If you look at the assembly code produced, you'll see in lines 9-11, it's doing a similar thing as the swap_if() function: ANDing one value with the mask, ANDing the other with the negation of the mask, and then ORing them together. And it produced that automatically from the ternary in the loop.
They can also do things like automatically generate epilogues with a serial loop to handle the leftover items if the loop count isn't an even multiple of the SIMD width. That's something else that I remember writing by hand before autovectorizers.
That said, coaxing an autovectorizer to actually vectorize a loop can be an art in itself. They're notoriously finicky. My favorite used to be the one in the old ("classic") ICC compiler where you use compiler flags to get a nice optimization report which would explain exactly why it chose what it did for each loop. You could also set #pragma's which would noisily warn or error out if the associated loop failed to vectorize for some reason.
(And of course, a lot of this stuff you might just use GPU compute for now.)
You wouldn't want to have to check each lane individually since that would spoil the point of using SSE. So you'd write masking ops like this and keep things parallel, tThen judiciously use any() and all() type intrinsics to check whether the lanes could agree to skip certain blocks conditionally.
(This was before ISPC and before autovectorization to handle it for you.)
And yes, the drivers would coordinate. (I've sometimes seen it done with a brief honk for attention followed by a hand wave.)