From f88c62602dc617b0f98abd7b61fd7775346a34e1 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 4 Feb 2025 13:36:28 -0800 Subject: [PATCH] Expand documentation. Remove unused variables. --- src/shaders/compute.wgsl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/shaders/compute.wgsl b/src/shaders/compute.wgsl index da0dd96..c07ce35 100644 --- a/src/shaders/compute.wgsl +++ b/src/shaders/compute.wgsl @@ -112,7 +112,13 @@ fn main(id: vec3) { * Twelve rounds of G mixing as part of BLAKE2b compression step. Normally, * each round is divided into eight subprocesses; NanoPow compresses these * operations into four subprocesses by executing sequential pairs - * simultaneously, inspired by https://github.com/minio/blake2b-simd + * simultaneously, inspired by https://github.com/minio/blake2b-simd. It then + * executes each compressed statement in pairs so that the compiler can + * interleave independent instructions and improve scheduling. That is to say, + * to execute `a = a + b` for subprocesses 1-4, first 1 is paired with 2 and 3 + * is paired with 4; then 1/2 is executed and 3/4 is executed; then the next + * computation `a = a + m[sigma[r][2*i+0]]` is executed in the same manner, and + * so on through all the steps of the subprocess. * * Each subprocess applies transformations to to `m` and `v` variables based on * a defined set of index inputs. The algorithm for each subprocess is defined @@ -138,12 +144,6 @@ fn main(id: vec3) { * Each sum step has an extra carry addition. Note that the m[sigma] sum is * skipped if m[sigma] is zero since it effectively does nothing. */ - var a: vec4; - var b: vec4; - var c: vec4; - var d: vec4; - var x: vec4; - var y: vec4; var v56: vec4; var vFC: vec4; var v74: vec4; -- 2.34.1