renormalizer

joined 4 months ago
[–] renormalizer@feddit.org 4 points 2 months ago* (last edited 2 months ago)
[–] renormalizer@feddit.org 2 points 3 months ago

Beltalowda best at rock tossing! Not Olympic discipline, sasa que. Damn inyalowda.

[–] renormalizer@feddit.org 5 points 3 months ago* (last edited 3 months ago) (1 children)

I've been a four-star programmer a few times. Imagine a blocked symmetric matrix where the rows and columns are indexed by triples (u,v,w). The entries are zero whenever u != u' or v != v', and because of symmetry you only store entries with w <= w'. But the range of v depends on the value of u and the range of w on the value of v. So you do

double ****mat = calloc (UMAX, sizeof(*mat));
for (int u = 0; u &lt; UMAX; ++u) {
  mat[u] = calloc (u + 1, sizeof(**mat));
  for (int v = 0; v &lt;= u; ++v) {
    mat[u][v] = calloc (v + 1, sizeof(***mat));
    for (int w = 0; w &lt;= v; ++w) {
      mat[u][v][w] = calloc (w + 1, sizeof(****mat));
      for (int ww = 0; ww &lt;= w; ++ww)
        mat[u][v][w][ww] = some_function (u, v, w, ww);
    }
  }
}

and weep a little. In reality, this gets a bit optimized by allocating a single chunk of memory and carving that up into the pointer and data arrays, so everything is reasonably close together in memory.

[–] renormalizer@feddit.org 2 points 3 months ago

Eine Kunst, bitte!

[–] renormalizer@feddit.org 9 points 4 months ago* (last edited 4 months ago) (1 children)

Es sind die Stimmen der Umweltminister

Es flüstert die ÖPNV-Industrie

Es flüstert die Wind- und Solarproduktion

Es flüstert von allen Kontinenten

Mobilmachung gegen die Auto-Union