Skip to main content

GEMM_ORACLE_LOGOS

Constant GEMM_ORACLE_LOGOS 

Source
pub const GEMM_ORACLE_LOGOS: &str = r#"## Main
Let n be 16.
Let mutable a be a new Seq of Int.
Let mutable b be a new Seq of Int.
Let mutable c be a new Seq of Int.
Let mutable i be 0.
While i is less than n:
    Let mutable j be 0.
    While j is less than n:
        Push ((i * n + j) % 255) - 128 to a.
        Push ((j * n + i) % 255) - 128 to b.
        Push 0 to c.
        Set j to j + 1.
    Set i to i + 1.
Set i to 0.
While i is less than n:
    Let mutable k be 0.
    While k is less than n:
        Let mutable j be 0.
        While j is less than n:
            Let idx be i * n + j + 1.
            Set item idx of c to item idx of c + item (i * n + k + 1) of a * item (k * n + j + 1) of b.
            Set j to j + 1.
        Set k to k + 1.
    Set i to i + 1.
Let mutable checksum be 0.
Set i to 1.
While i is at most n * n:
    Set checksum to checksum + item i of c.
    Set i to i + 1.
Show checksum.
"#;