omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / src / omega_matvec_quad.h
| 1 | /* SPDX-License-Identifier: Apache-2.0 |
| 2 | * Copyright 2026 Drake Stapleton (AIEN / aien-dev) |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /* |
| 18 | * omega_matvec_quad.h -- one more native realization of Omega's matvec (R10). |
| 19 | * |
| 20 | * The M12 family in omega_matvec.c is left exactly as qualified. Measured on |
| 21 | * the DGX Spark (Neoverse V2), none of its three kinds beats the compiled |
| 22 | * semantic reference: every element load post-increments its base register, |
| 23 | * so each row is a serial chain of address updates. |
| 24 | * |
| 25 | * quad4 keeps four independent accumulators, loads at fixed offsets from a |
| 26 | * base that moves once per four elements, and finishes N % 4 with the same |
| 27 | * scalar tail the M12 kinds use. Same calling convention and semantics: |
| 28 | * y[i] = sum_j A[i*N+j] * x[j] mod 2^64, for M >= 1 and N >= 1. |
| 29 | */ |
| 30 | #ifndef OMEGA_MATVEC_QUAD_H |
| 31 | #define OMEGA_MATVEC_QUAD_H |
| 32 | |
| 33 | #include "omega_matvec.h" |
| 34 | |
| 35 | /* Kind code carried beside the M12 kinds. Not a member of the M12 family. */ |
| 36 | #define OMEGA_MATVEC_KIND_QUAD4 3u |
| 37 | |
| 38 | int omega_matvec_synthesize_quad4(const MatVecSemanticSpec *spec, const OmegaMachineGraph *mg, |
| 39 | MatVecRealization *out); |
| 40 | |
| 41 | #endif /* OMEGA_MATVEC_QUAD_H */ |