SA-C
1 program
Added 2026-02-26T10:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: Single Assignment C
Provenance: commit 3b60a8cf0b · authored 2026-02-26T15:06:36+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
4 sources · pl_id:
pl/sassyRelated languages
LLM-contributed programs
Gaussian Blur
Provenance: commit 3b60a8cf0b · authored 2026-02-26T15:06:36+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
/* SA-C (Single-Assignment C): Gaussian 3x3 blur kernel applied to a 2D array */
/* Demonstrates SA-C array comprehensions and reductions */
float[.,.] blur3x3(float[.,.] img) {
int rows = shape(img, 0);
int cols = shape(img, 1);
float[3,3] kernel = [[1.0, 2.0, 1.0],
[2.0, 4.0, 2.0],
[1.0, 2.0, 1.0]];
float[rows-2, cols-2] result =
{| (1.0/16.0) * sum({| kernel[kr,kc] * img[r+kr, c+kc]
: kr in [0..3], kc in [0..3] |})
: r in [0..rows-2], c in [0..cols-2] |};
return result;
}
float[.] row_sums(float[.,.] m) {
return {| sum({| m[r,c] : c in [0..shape(m,1)] |})
: r in [0..shape(m,0)] |};
}
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)