Skip to content

Implementations

Generated page

This page is generated by gen_mipp_docs.py from the JSON Schemas of the generator (generator/helpers_headers/schemas/, generator/helpers_tests/schemas/). To change it, edit the description fields of the schemas, not this page.

Implementation entries of the levels 0 to 2: simd_ext/<isa>/<isa>_native_implems.json (Level 0), simd_ext/<isa>/<isa>_emu_implems.json (Level 1) and, for every ISA, helpers_headers/generic_emu_implems.json, generic_emu_implems_mask.json (masked variants) and generic_emu_implems_lmulh.json (horizontal functions with LMUL > 1) (Level 2). Each function maps to a list of candidate entries. For each datatype, mask variant and preprocessor condition, the candidate resolver keeps the lowest level whose dependencies are available. The bodies of the immediate versions of an ISA, simd_ext/<isa>/<isa>_imm_implems.json (optional), use the same format.

Checked when the file is loaded: the functions and the datatypes exist in the interfaces and in the ISA descriptor, and every template / template_ref resolves. The levels, dead-code and duplicates audits check the placement and the overlaps of the entries.

Files (in generator/) Schema
simd_ext/<isa>/<isa>_native_implems.json
simd_ext/<isa>/<isa>_emu_implems.json
simd_ext/<isa>/<isa>_imm_implems.json
helpers_headers/generic_emu_implems.json
helpers_headers/generic_emu_implems_mask.json
helpers_headers/generic_emu_implems_lmulh.json
helpers_headers/schemas/implems_schema.json

Example

{
    "div": [
        {
            "instr_name": "recpeq",
            "datatypes": [
                "float32"
            ],
            "template": "arith_2args_recp",
            "if": "!defined(__aarch64__)"
        }
    ]
}

Fields

Field Type Description
<function> array of item
<group> map of array of item
<group>.<function> array of item

Definitions

item

Type: object. A candidate implementation of a function.

Field Type Description
instr_name string String passed to the template as instr_name, usually the name of the intrinsic without prefix and suffix (add, recpeq). Omitted: the function name in the generic files, an empty string in the ISA files.
datatypes string or array of string Required. Alias of DATATYPES_MAP or explicit list of the datatypes (pairs for the conversions) of the entry.
template string or embedded_template Name of a template of the matching *_templates.json file of the ISA, or an inline template (Templates). One of template and template_ref is required.
template_ref string Reference to a generic template, with its prefix: tpl_generic_emu.<name>, tpl_mask_generic_emu.<name> or tpl_horiz_lmul_generic_emu.<name>.
if string Preprocessor condition of the entry. The entry is emitted under #if <condition>; the rest of the condition space goes to the next candidates.
skip_audit_level boolean true disables the levels audit for this entry.
derived_form string Name of a function: the level of the entry is the level of that function for the same datatype and mask variant (a call of the function that costs nothing more: the generic bodies of the scalar forms, forms.py, and the _b128 functions of the ISAs whose register is one block of 128 bits). Set by the generator for the scalar forms.
skip_audit_level_reason string Why the levels audit is disabled (requires skip_audit_level: true).
variant string m, z or s: the entry implements this mask variant (Merge-Masked, Zero-Masked, Source-Masked). Without it, the entry implements the unmasked variant u. Values: m, z, s.
mode string horiz_lmul: the entry implements a horizontal function with LMUL > 1. Not a mask variant: do not combine with variant. Values: horiz_lmul.
type string Set by the generator when the files are loaded (emulated for the emulation files): leave it out. Values: native, emulated.
dependencies array of string Computed by the generator from the MIPP calls of the template: leave it out.
preferred_simd_ext string or array of string ISA or list of ISAs. Among the candidates of the same level, the entry is tried first on these ISAs and last on the others.
simd_size integer or array of integer Register size or list of sizes, in bits after LMUL, for which the entry applies (e.g. 128).

embedded_template

Type: object. Inline template, same fields as in a templates file (Templates).

Field Type Description
format string See Templates. Values: short, long.
code string or array of string Required. See Templates.