MathView rendering helpers for KernelIR graphs.
More...
Go to the source code of this file.
|
|
#define | SIM_IR_MATHVIEW_SCHEMA_VERSION "1.0" |
| |
|
#define | SIM_IR_MATHVIEW_COMPLEX_SEMANTICS "cartesian" |
| |
|
#define | SIM_IR_MATHVIEW_COMPLEX_BRANCH "principal" |
| |
|
| SimResult | sim_ir_mathview_render (const SimIRBuilder *builder, SimIRNodeId root, char *buffer, size_t capacity, size_t *out_length) |
| | Render a KernelIR expression into a canonical MathView string.
|
| |
| SimResult | sim_ir_mathview_render_json (const SimIRBuilder *builder, SimIRNodeId root, char *buffer, size_t capacity, size_t *out_length) |
| | Render a KernelIR expression into a Math IR JSON AST.
|
| |
| SimResult | sim_ir_mathview_render_latex (const SimIRBuilder *builder, SimIRNodeId root, char *buffer, size_t capacity, size_t *out_length) |
| | Render a KernelIR expression into a LaTeX outline string.
|
| |
| SimResult | sim_ir_mathview_hash (const SimIRBuilder *builder, SimIRNodeId root, uint64_t *out_hash) |
| | Hash a KernelIR expression based on its canonical MathView string.
|
| |
| SimResult | sim_ir_mathview_hash_sha256 (const SimIRBuilder *builder, SimIRNodeId root, unsigned char out_hash[32]) |
| | Hash a KernelIR expression based on its canonical MathView string.
|
| |
MathView rendering helpers for KernelIR graphs.
◆ sim_ir_mathview_hash()
Hash a KernelIR expression based on its canonical MathView string.
- Parameters
-
| builder | Builder containing the referenced nodes. |
| root | Root node identifier. |
| [out] | out_hash | Receives the computed 64-bit hash. |
- Returns
- SIM_RESULT_OK on success.
◆ sim_ir_mathview_hash_sha256()
Hash a KernelIR expression based on its canonical MathView string.
Uses SHA-256 over the canonical string (including header).
- Parameters
-
| builder | Builder containing the referenced nodes. |
| root | Root node identifier. |
| [out] | out_hash | Receives the 32-byte SHA-256 digest. |
- Returns
- SIM_RESULT_OK on success.
◆ sim_ir_mathview_render()
Render a KernelIR expression into a canonical MathView string.
The canonical string includes a schema header with complex semantics.
- Parameters
-
| builder | Builder containing the referenced nodes. |
| root | Root node identifier. |
| buffer | Output buffer (may be NULL to query required length). |
| capacity | Capacity of buffer in bytes. |
| [out] | out_length | Receives the required length (without NUL) when non-NULL. |
- Returns
- SIM_RESULT_OK on success, SIM_RESULT_OUT_OF_MEMORY if
buffer is too small.
◆ sim_ir_mathview_render_json()
Render a KernelIR expression into a Math IR JSON AST.
- Parameters
-
| builder | Builder containing the referenced nodes. |
| root | Root node identifier. |
| buffer | Output buffer (may be NULL to query required length). |
| capacity | Capacity of buffer in bytes. |
| [out] | out_length | Receives the required length (without NUL) when non-NULL. |
- Returns
- SIM_RESULT_OK on success, SIM_RESULT_OUT_OF_MEMORY if
buffer is too small.
◆ sim_ir_mathview_render_latex()
Render a KernelIR expression into a LaTeX outline string.
- Parameters
-
| builder | Builder containing the referenced nodes. |
| root | Root node identifier. |
| buffer | Output buffer (may be NULL to query required length). |
| capacity | Capacity of buffer in bytes. |
| [out] | out_length | Receives the required length (without NUL) when non-NULL. |
- Returns
- SIM_RESULT_OK on success, SIM_RESULT_OUT_OF_MEMORY if
buffer is too small.