pascalx.lang.math.avo.pas

Переключить прокрутку окна
Загрузить этот исходный код

{
    pascalx.lang.math.avo — продвинутые векторные операции; поддержка комплексных
    чисел, кватернионов и октонионов. Для работы этого модуля требуется динамически
    подключаемая библиотека avo (avo.dll либо libavo.so).

    Copyright © 2026 Малик Разработчик

    Это свободная программа: вы можете перераспространять её и/или изменять
    её на условиях Меньшей Стандартной общественной лицензии GNU в том виде,
    в каком она была опубликована Фондом свободного программного обеспечения;
    либо версии 3 лицензии, либо (по вашему выбору) любой более поздней версии.

    Эта программа распространяется в надежде, что она будет полезной,
    но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА
    или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЁННЫХ ЦЕЛЕЙ. Подробнее см. в Меньшей Стандартной
    общественной лицензии GNU.

    Вы должны были получить копию Меньшей Стандартной общественной лицензии GNU
    вместе с этой программой. Если это не так, см.
    <https://www.gnu.org/licenses/>.
}

unit pascalx.lang.math.avo;

    {$MODE OBJFPC}

interface

    {%region} uses
        pascalx.lang;
    {%endregion}

    {$TYPEINFO ON}
    {$IFDEF WINDOWS}{$CALLING STDCALL}{$ELSE}{$CALLING CDECL}{$ENDIF}

    const UNIT_NAME = 'pascalx.lang.math.avo';

    {%region} type
        byte2   = packed array [0..1] of byte;
        byte4   = packed array [0..3] of byte;
        byte8   = packed array [0..7] of byte;
        short2  = packed array [0..1] of short;
        short4  = packed array [0..3] of short;
        short8  = packed array [0..7] of short;
        int2    = packed array [0..1] of int;
        int4    = packed array [0..3] of int;
        int8    = packed array [0..7] of int;
        long2   = packed array [0..1] of long;
        long4   = packed array [0..3] of long;
        long8   = packed array [0..7] of long;
        float2  = packed array [0..1] of float;
        float4  = packed array [0..3] of float;
        float8  = packed array [0..7] of float;
        double2 = packed array [0..1] of double;
        double4 = packed array [0..3] of double;
        double8 = packed array [0..7] of double;

        byte2_Array1d   = specialize DynamicArray<byte2>;
        byte4_Array1d   = specialize DynamicArray<byte4>;
        byte8_Array1d   = specialize DynamicArray<byte8>;
        short2_Array1d  = specialize DynamicArray<short2>;
        short4_Array1d  = specialize DynamicArray<short4>;
        short8_Array1d  = specialize DynamicArray<short8>;
        int2_Array1d    = specialize DynamicArray<int2>;
        int4_Array1d    = specialize DynamicArray<int4>;
        int8_Array1d    = specialize DynamicArray<int8>;
        long2_Array1d   = specialize DynamicArray<long2>;
        long4_Array1d   = specialize DynamicArray<long4>;
        long8_Array1d   = specialize DynamicArray<long8>;
        float2_Array1d  = specialize DynamicArray<float2>;
        float4_Array1d  = specialize DynamicArray<float4>;
        float8_Array1d  = specialize DynamicArray<float8>;
        double2_Array1d = specialize DynamicArray<double2>;
        double4_Array1d = specialize DynamicArray<double4>;
        double8_Array1d = specialize DynamicArray<double8>;

        byte2_Array2d   = specialize DynamicArray<byte2_Array1d>;
        byte4_Array2d   = specialize DynamicArray<byte4_Array1d>;
        byte8_Array2d   = specialize DynamicArray<byte8_Array1d>;
        short2_Array2d  = specialize DynamicArray<short2_Array1d>;
        short4_Array2d  = specialize DynamicArray<short4_Array1d>;
        short8_Array2d  = specialize DynamicArray<short8_Array1d>;
        int2_Array2d    = specialize DynamicArray<int2_Array1d>;
        int4_Array2d    = specialize DynamicArray<int4_Array1d>;
        int8_Array2d    = specialize DynamicArray<int8_Array1d>;
        long2_Array2d   = specialize DynamicArray<long2_Array1d>;
        long4_Array2d   = specialize DynamicArray<long4_Array1d>;
        long8_Array2d   = specialize DynamicArray<long8_Array1d>;
        float2_Array2d  = specialize DynamicArray<float2_Array1d>;
        float4_Array2d  = specialize DynamicArray<float4_Array1d>;
        float8_Array2d  = specialize DynamicArray<float8_Array1d>;
        double2_Array2d = specialize DynamicArray<double2_Array1d>;
        double4_Array2d = specialize DynamicArray<double4_Array1d>;
        double8_Array2d = specialize DynamicArray<double8_Array1d>;

        Cast   = class;
        Scalar = class;
        Vector = class;
        VArray = class;

        Cast = class sealed
        public
            class function toByte2(const value: byte4): byte2; static;
            class function toByte2(const value: byte8): byte2; static;
            class function toByte2(const value: short2): byte2; static;
            class function toByte2(const value: short4): byte2; static;
            class function toByte2(const value: short8): byte2; static;
            class function toByte2(const value: int2): byte2; static;
            class function toByte2(const value: int4): byte2; static;
            class function toByte2(const value: int8): byte2; static;
            class function toByte2(const value: long2): byte2; static;
            class function toByte2(const value: long4): byte2; static;
            class function toByte2(const value: long8): byte2; static;
            class function toByte2(const value: float2): byte2; static;
            class function toByte2(const value: float4): byte2; static;
            class function toByte2(const value: float8): byte2; static;
            class function toByte2(const value: double2): byte2; static;
            class function toByte2(const value: double4): byte2; static;
            class function toByte2(const value: double8): byte2; static;
            class function toByte4(const value: byte8): byte4; static;
            class function toByte4(const value: short4): byte4; static;
            class function toByte4(const value: short8): byte4; static;
            class function toByte4(const value: int4): byte4; static;
            class function toByte4(const value: int8): byte4; static;
            class function toByte4(const value: long4): byte4; static;
            class function toByte4(const value: long8): byte4; static;
            class function toByte4(const value: float4): byte4; static;
            class function toByte4(const value: float8): byte4; static;
            class function toByte4(const value: double4): byte4; static;
            class function toByte4(const value: double8): byte4; static;
            class function toByte8(const value: short8): byte8; static;
            class function toByte8(const value: int8): byte8; static;
            class function toByte8(const value: long8): byte8; static;
            class function toByte8(const value: float8): byte8; static;
            class function toByte8(const value: double8): byte8; static;
            class function toShort2(const value: short4): short2; static;
            class function toShort2(const value: short8): short2; static;
            class function toShort2(const value: int2): short2; static;
            class function toShort2(const value: int4): short2; static;
            class function toShort2(const value: int8): short2; static;
            class function toShort2(const value: long2): short2; static;
            class function toShort2(const value: long4): short2; static;
            class function toShort2(const value: long8): short2; static;
            class function toShort2(const value: float2): short2; static;
            class function toShort2(const value: float4): short2; static;
            class function toShort2(const value: float8): short2; static;
            class function toShort2(const value: double2): short2; static;
            class function toShort2(const value: double4): short2; static;
            class function toShort2(const value: double8): short2; static;
            class function toShort4(const value: short8): short4; static;
            class function toShort4(const value: int4): short4; static;
            class function toShort4(const value: int8): short4; static;
            class function toShort4(const value: long4): short4; static;
            class function toShort4(const value: long8): short4; static;
            class function toShort4(const value: float4): short4; static;
            class function toShort4(const value: float8): short4; static;
            class function toShort4(const value: double4): short4; static;
            class function toShort4(const value: double8): short4; static;
            class function toShort8(const value: int8): short8; static;
            class function toShort8(const value: long8): short8; static;
            class function toShort8(const value: float8): short8; static;
            class function toShort8(const value: double8): short8; static;
            class function toInt2(const value: int4): int2; static;
            class function toInt2(const value: int8): int2; static;
            class function toInt2(const value: long2): int2; static;
            class function toInt2(const value: long4): int2; static;
            class function toInt2(const value: long8): int2; static;
            class function toInt2(const value: float2): int2; static;
            class function toInt2(const value: float4): int2; static;
            class function toInt2(const value: float8): int2; static;
            class function toInt2(const value: double2): int2; static;
            class function toInt2(const value: double4): int2; static;
            class function toInt2(const value: double8): int2; static;
            class function toInt4(const value: int8): int4; static;
            class function toInt4(const value: long4): int4; static;
            class function toInt4(const value: long8): int4; static;
            class function toInt4(const value: float4): int4; static;
            class function toInt4(const value: float8): int4; static;
            class function toInt4(const value: double4): int4; static;
            class function toInt4(const value: double8): int4; static;
            class function toInt8(const value: long8): int8; static;
            class function toInt8(const value: float8): int8; static;
            class function toInt8(const value: double8): int8; static;
            class function toLong2(const value: long4): long2; static;
            class function toLong2(const value: long8): long2; static;
            class function toLong2(const value: float2): long2; static;
            class function toLong2(const value: float4): long2; static;
            class function toLong2(const value: float8): long2; static;
            class function toLong2(const value: double2): long2; static;
            class function toLong2(const value: double4): long2; static;
            class function toLong2(const value: double8): long2; static;
            class function toLong4(const value: long8): long4; static;
            class function toLong4(const value: float4): long4; static;
            class function toLong4(const value: float8): long4; static;
            class function toLong4(const value: double4): long4; static;
            class function toLong4(const value: double8): long4; static;
            class function toLong8(const value: float8): long8; static;
            class function toLong8(const value: double8): long8; static;
            class function toFloat2(const value: int2): float2; static;
            class function toFloat2(const value: int4): float2; static;
            class function toFloat2(const value: int8): float2; static;
            class function toFloat2(const value: long2): float2; static;
            class function toFloat2(const value: long4): float2; static;
            class function toFloat2(const value: long8): float2; static;
            class function toFloat2(const value: float4): float2; static;
            class function toFloat2(const value: float8): float2; static;
            class function toFloat2(const value: double2): float2; static;
            class function toFloat2(const value: double4): float2; static;
            class function toFloat2(const value: double8): float2; static;
            class function toFloat4(const value: int4): float4; static;
            class function toFloat4(const value: int8): float4; static;
            class function toFloat4(const value: long4): float4; static;
            class function toFloat4(const value: long8): float4; static;
            class function toFloat4(const value: float8): float4; static;
            class function toFloat4(const value: double4): float4; static;
            class function toFloat4(const value: double8): float4; static;
            class function toFloat8(const value: int8): float8; static;
            class function toFloat8(const value: long8): float8; static;
            class function toFloat8(const value: double8): float8; static;
            class function toDouble2(const value: long2): double2; static;
            class function toDouble2(const value: long4): double2; static;
            class function toDouble2(const value: long8): double2; static;
            class function toDouble2(const value: double4): double2; static;
            class function toDouble2(const value: double8): double2; static;
            class function toDouble4(const value: long4): double4; static;
            class function toDouble4(const value: long8): double4; static;
            class function toDouble4(const value: double8): double4; static;
            class function toDouble8(const value: long8): double8; static;
        end;

        Scalar = class sealed
        public
            class function conj(const value: byte2): int2; static;
            class function conj(const value: byte4): int4; static;
            class function conj(const value: byte8): int8; static;
            class function conj(const value: short2): int2; static;
            class function conj(const value: short4): int4; static;
            class function conj(const value: short8): int8; static;
            class function conj(const value: int2): int2; static;
            class function conj(const value: int4): int4; static;
            class function conj(const value: int8): int8; static;
            class function conj(const value: long2): long2; static;
            class function conj(const value: long4): long4; static;
            class function conj(const value: long8): long8; static;
            class function conj(const value: float2): float2; static;
            class function conj(const value: float4): float4; static;
            class function conj(const value: float8): float8; static;
            class function conj(const value: double2): double2; static;
            class function conj(const value: double4): double4; static;
            class function conj(const value: double8): double8; static;
            class function sar(const value: byte2; bits: int): int2; static;
            class function sar(const value: byte4; bits: int): int4; static;
            class function sar(const value: byte8; bits: int): int8; static;
            class function sar(const value: short2; bits: int): int2; static;
            class function sar(const value: short4; bits: int): int4; static;
            class function sar(const value: short8; bits: int): int8; static;
            class function sar(const value: int2; bits: int): int2; static;
            class function sar(const value: int4; bits: int): int4; static;
            class function sar(const value: int8; bits: int): int8; static;
            class function sar(const value: long2; bits: int): long2; static;
            class function sar(const value: long4; bits: int): long4; static;
            class function sar(const value: long8; bits: int): long8; static;
            class function inv(const value: float2): float2; static;
            class function inv(const value: float4): float4; static;
            class function inv(const value: float8): float8; static;
            class function inv(const value: double2): double2; static;
            class function inv(const value: double4): double4; static;
            class function inv(const value: double8): double8; static;
        end;

        Vector = class sealed
        public
            class function isAVX512SupportedByCPU(): boolean; static;
            class function isAVX512SupportedByOS(): boolean; static;
            class function pck(const value: short): byte; static;
            class function pck(const value: short2): byte2; static;
            class function pck(const value: short4): byte4; static;
            class function pck(const value: short8): byte8; static;
            class function pck(const value: int): short; static;
            class function pck(const value: int2): short2; static;
            class function pck(const value: int4): short4; static;
            class function pck(const value: int8): short8; static;
            class function pck(const value: long): int; static;
            class function pck(const value: long2): int2; static;
            class function pck(const value: long4): int4; static;
            class function pck(const value: long8): int8; static;
            class function lup(const value: byte): short; static;
            class function lup(const value: byte2): short2; static;
            class function lup(const value: byte4): short4; static;
            class function lup(const value: byte8): short8; static;
            class function lup(const value: short): int; static;
            class function lup(const value: short2): int2; static;
            class function lup(const value: short4): int4; static;
            class function lup(const value: short8): int8; static;
            class function lup(const value: int): long; static;
            class function lup(const value: int2): long2; static;
            class function lup(const value: int4): long4; static;
            class function lup(const value: int8): long8; static;
            class function uup(const value: byte): short; static;
            class function uup(const value: byte2): short2; static;
            class function uup(const value: byte4): short4; static;
            class function uup(const value: byte8): short8; static;
            class function uup(const value: short): int; static;
            class function uup(const value: short2): int2; static;
            class function uup(const value: short4): int4; static;
            class function uup(const value: short8): int8; static;
            class function uup(const value: int): long; static;
            class function uup(const value: int2): long2; static;
            class function uup(const value: int4): long4; static;
            class function uup(const value: int8): long8; static;
            class function neg(const value: byte2): byte2; static;
            class function neg(const value: byte4): byte4; static;
            class function neg(const value: byte8): byte8; static;
            class function neg(const value: short2): short2; static;
            class function neg(const value: short4): short4; static;
            class function neg(const value: short8): short8; static;
            class function neg(const value: int2): int2; static;
            class function neg(const value: int4): int4; static;
            class function neg(const value: int8): int8; static;
            class function neg(const value: long2): long2; static;
            class function neg(const value: long4): long4; static;
            class function neg(const value: long8): long8; static;
            class function neg(const value: float2): float2; static;
            class function neg(const value: float4): float4; static;
            class function neg(const value: float8): float8; static;
            class function neg(const value: double2): double2; static;
            class function neg(const value: double4): double4; static;
            class function neg(const value: double8): double8; static;
            class function add(const value1, value2: byte2): byte2; static;
            class function add(const value1, value2: byte4): byte4; static;
            class function add(const value1, value2: byte8): byte8; static;
            class function add(const value1, value2: short2): short2; static;
            class function add(const value1, value2: short4): short4; static;
            class function add(const value1, value2: short8): short8; static;
            class function add(const value1, value2: int2): int2; static;
            class function add(const value1, value2: int4): int4; static;
            class function add(const value1, value2: int8): int8; static;
            class function add(const value1, value2: long2): long2; static;
            class function add(const value1, value2: long4): long4; static;
            class function add(const value1, value2: long8): long8; static;
            class function add(const value1, value2: float2): float2; static;
            class function add(const value1, value2: float4): float4; static;
            class function add(const value1, value2: float8): float8; static;
            class function add(const value1, value2: double2): double2; static;
            class function add(const value1, value2: double4): double4; static;
            class function add(const value1, value2: double8): double8; static;
            class function &div(const value1, value2: float2): float2; static;
            class function &div(const value1, value2: float4): float4; static;
            class function &div(const value1, value2: float8): float8; static;
            class function &div(const value1, value2: double2): double2; static;
            class function &div(const value1, value2: double4): double4; static;
            class function &div(const value1, value2: double8): double8; static;
            class function eq(const value1, value2: byte): byte; static;
            class function eq(const value1, value2: byte2): byte2; static;
            class function eq(const value1, value2: byte4): byte4; static;
            class function eq(const value1, value2: byte8): byte8; static;
            class function eq(const value1, value2: short): short; static;
            class function eq(const value1, value2: short2): short2; static;
            class function eq(const value1, value2: short4): short4; static;
            class function eq(const value1, value2: short8): short8; static;
            class function eq(const value1, value2: int): int; static;
            class function eq(const value1, value2: int2): int2; static;
            class function eq(const value1, value2: int4): int4; static;
            class function eq(const value1, value2: int8): int8; static;
            class function eq(const value1, value2: long): long; static;
            class function eq(const value1, value2: long2): long2; static;
            class function eq(const value1, value2: long4): long4; static;
            class function eq(const value1, value2: long8): long8; static;
            class function eq(const value1, value2: float): int; static;
            class function eq(const value1, value2: float2): int2; static;
            class function eq(const value1, value2: float4): int4; static;
            class function eq(const value1, value2: float8): int8; static;
            class function eq(const value1, value2: double): long; static;
            class function eq(const value1, value2: double2): long2; static;
            class function eq(const value1, value2: double4): long4; static;
            class function eq(const value1, value2: double8): long8; static;
            class function ge(const value1, value2: byte): byte; static;
            class function ge(const value1, value2: byte2): byte2; static;
            class function ge(const value1, value2: byte4): byte4; static;
            class function ge(const value1, value2: byte8): byte8; static;
            class function ge(const value1, value2: short): short; static;
            class function ge(const value1, value2: short2): short2; static;
            class function ge(const value1, value2: short4): short4; static;
            class function ge(const value1, value2: short8): short8; static;
            class function ge(const value1, value2: int): int; static;
            class function ge(const value1, value2: int2): int2; static;
            class function ge(const value1, value2: int4): int4; static;
            class function ge(const value1, value2: int8): int8; static;
            class function ge(const value1, value2: long): long; static;
            class function ge(const value1, value2: long2): long2; static;
            class function ge(const value1, value2: long4): long4; static;
            class function ge(const value1, value2: long8): long8; static;
            class function ge(const value1, value2: float): int; static;
            class function ge(const value1, value2: float2): int2; static;
            class function ge(const value1, value2: float4): int4; static;
            class function ge(const value1, value2: float8): int8; static;
            class function ge(const value1, value2: double): long; static;
            class function ge(const value1, value2: double2): long2; static;
            class function ge(const value1, value2: double4): long4; static;
            class function ge(const value1, value2: double8): long8; static;
            class function gt(const value1, value2: byte): byte; static;
            class function gt(const value1, value2: byte2): byte2; static;
            class function gt(const value1, value2: byte4): byte4; static;
            class function gt(const value1, value2: byte8): byte8; static;
            class function gt(const value1, value2: short): short; static;
            class function gt(const value1, value2: short2): short2; static;
            class function gt(const value1, value2: short4): short4; static;
            class function gt(const value1, value2: short8): short8; static;
            class function gt(const value1, value2: int): int; static;
            class function gt(const value1, value2: int2): int2; static;
            class function gt(const value1, value2: int4): int4; static;
            class function gt(const value1, value2: int8): int8; static;
            class function gt(const value1, value2: long): long; static;
            class function gt(const value1, value2: long2): long2; static;
            class function gt(const value1, value2: long4): long4; static;
            class function gt(const value1, value2: long8): long8; static;
            class function gt(const value1, value2: float): int; static;
            class function gt(const value1, value2: float2): int2; static;
            class function gt(const value1, value2: float4): int4; static;
            class function gt(const value1, value2: float8): int8; static;
            class function gt(const value1, value2: double): long; static;
            class function gt(const value1, value2: double2): long2; static;
            class function gt(const value1, value2: double4): long4; static;
            class function gt(const value1, value2: double8): long8; static;
            class function le(const value1, value2: byte): byte; static;
            class function le(const value1, value2: byte2): byte2; static;
            class function le(const value1, value2: byte4): byte4; static;
            class function le(const value1, value2: byte8): byte8; static;
            class function le(const value1, value2: short): short; static;
            class function le(const value1, value2: short2): short2; static;
            class function le(const value1, value2: short4): short4; static;
            class function le(const value1, value2: short8): short8; static;
            class function le(const value1, value2: int): int; static;
            class function le(const value1, value2: int2): int2; static;
            class function le(const value1, value2: int4): int4; static;
            class function le(const value1, value2: int8): int8; static;
            class function le(const value1, value2: long): long; static;
            class function le(const value1, value2: long2): long2; static;
            class function le(const value1, value2: long4): long4; static;
            class function le(const value1, value2: long8): long8; static;
            class function le(const value1, value2: float): int; static;
            class function le(const value1, value2: float2): int2; static;
            class function le(const value1, value2: float4): int4; static;
            class function le(const value1, value2: float8): int8; static;
            class function le(const value1, value2: double): long; static;
            class function le(const value1, value2: double2): long2; static;
            class function le(const value1, value2: double4): long4; static;
            class function le(const value1, value2: double8): long8; static;
            class function lt(const value1, value2: byte): byte; static;
            class function lt(const value1, value2: byte2): byte2; static;
            class function lt(const value1, value2: byte4): byte4; static;
            class function lt(const value1, value2: byte8): byte8; static;
            class function lt(const value1, value2: short): short; static;
            class function lt(const value1, value2: short2): short2; static;
            class function lt(const value1, value2: short4): short4; static;
            class function lt(const value1, value2: short8): short8; static;
            class function lt(const value1, value2: int): int; static;
            class function lt(const value1, value2: int2): int2; static;
            class function lt(const value1, value2: int4): int4; static;
            class function lt(const value1, value2: int8): int8; static;
            class function lt(const value1, value2: long): long; static;
            class function lt(const value1, value2: long2): long2; static;
            class function lt(const value1, value2: long4): long4; static;
            class function lt(const value1, value2: long8): long8; static;
            class function lt(const value1, value2: float): int; static;
            class function lt(const value1, value2: float2): int2; static;
            class function lt(const value1, value2: float4): int4; static;
            class function lt(const value1, value2: float8): int8; static;
            class function lt(const value1, value2: double): long; static;
            class function lt(const value1, value2: double2): long2; static;
            class function lt(const value1, value2: double4): long4; static;
            class function lt(const value1, value2: double8): long8; static;
            class function ne(const value1, value2: byte): byte; static;
            class function ne(const value1, value2: byte2): byte2; static;
            class function ne(const value1, value2: byte4): byte4; static;
            class function ne(const value1, value2: byte8): byte8; static;
            class function ne(const value1, value2: short): short; static;
            class function ne(const value1, value2: short2): short2; static;
            class function ne(const value1, value2: short4): short4; static;
            class function ne(const value1, value2: short8): short8; static;
            class function ne(const value1, value2: int): int; static;
            class function ne(const value1, value2: int2): int2; static;
            class function ne(const value1, value2: int4): int4; static;
            class function ne(const value1, value2: int8): int8; static;
            class function ne(const value1, value2: long): long; static;
            class function ne(const value1, value2: long2): long2; static;
            class function ne(const value1, value2: long4): long4; static;
            class function ne(const value1, value2: long8): long8; static;
            class function ne(const value1, value2: float): int; static;
            class function ne(const value1, value2: float2): int2; static;
            class function ne(const value1, value2: float4): int4; static;
            class function ne(const value1, value2: float8): int8; static;
            class function ne(const value1, value2: double): long; static;
            class function ne(const value1, value2: double2): long2; static;
            class function ne(const value1, value2: double4): long4; static;
            class function ne(const value1, value2: double8): long8; static;
            class function hmul(const value1, value2: byte): byte; static;
            class function hmul(const value1, value2: byte2): byte2; static;
            class function hmul(const value1, value2: byte4): byte4; static;
            class function hmul(const value1, value2: byte8): byte8; static;
            class function hmul(const value1, value2: short): short; static;
            class function hmul(const value1, value2: short2): short2; static;
            class function hmul(const value1, value2: short4): short4; static;
            class function hmul(const value1, value2: short8): short8; static;
            class function hmulu(const value1, value2: byte): byte; static;
            class function hmulu(const value1, value2: byte2): byte2; static;
            class function hmulu(const value1, value2: byte4): byte4; static;
            class function hmulu(const value1, value2: byte8): byte8; static;
            class function hmulu(const value1, value2: short): short; static;
            class function hmulu(const value1, value2: short2): short2; static;
            class function hmulu(const value1, value2: short4): short4; static;
            class function hmulu(const value1, value2: short8): short8; static;
            class function mul(const value1, value2: byte2): byte2; static;
            class function mul(const value1, value2: byte4): byte4; static;
            class function mul(const value1, value2: byte8): byte8; static;
            class function mul(const value1, value2: short2): short2; static;
            class function mul(const value1, value2: short4): short4; static;
            class function mul(const value1, value2: short8): short8; static;
            class function mul(const value1, value2: int2): int2; static;
            class function mul(const value1, value2: int4): int4; static;
            class function mul(const value1, value2: int8): int8; static;
            class function mul(const value1, value2: long2): long2; static;
            class function mul(const value1, value2: long4): long4; static;
            class function mul(const value1, value2: long8): long8; static;
            class function mul(const value1, value2: float2): float2; static;
            class function mul(const value1, value2: float4): float4; static;
            class function mul(const value1, value2: float8): float8; static;
            class function mul(const value1, value2: double2): double2; static;
            class function mul(const value1, value2: double4): double4; static;
            class function mul(const value1, value2: double8): double8; static;
            class function sadd(const value1, value2: byte): byte; static;
            class function sadd(const value1, value2: byte2): byte2; static;
            class function sadd(const value1, value2: byte4): byte4; static;
            class function sadd(const value1, value2: byte8): byte8; static;
            class function sadd(const value1, value2: short): short; static;
            class function sadd(const value1, value2: short2): short2; static;
            class function sadd(const value1, value2: short4): short4; static;
            class function sadd(const value1, value2: short8): short8; static;
            class function saddu(const value1, value2: byte): byte; static;
            class function saddu(const value1, value2: byte2): byte2; static;
            class function saddu(const value1, value2: byte4): byte4; static;
            class function saddu(const value1, value2: byte8): byte8; static;
            class function saddu(const value1, value2: short): short; static;
            class function saddu(const value1, value2: short2): short2; static;
            class function saddu(const value1, value2: short4): short4; static;
            class function saddu(const value1, value2: short8): short8; static;
            class function ssub(const value1, value2: byte): byte; static;
            class function ssub(const value1, value2: byte2): byte2; static;
            class function ssub(const value1, value2: byte4): byte4; static;
            class function ssub(const value1, value2: byte8): byte8; static;
            class function ssub(const value1, value2: short): short; static;
            class function ssub(const value1, value2: short2): short2; static;
            class function ssub(const value1, value2: short4): short4; static;
            class function ssub(const value1, value2: short8): short8; static;
            class function ssubu(const value1, value2: byte): byte; static;
            class function ssubu(const value1, value2: byte2): byte2; static;
            class function ssubu(const value1, value2: byte4): byte4; static;
            class function ssubu(const value1, value2: byte8): byte8; static;
            class function ssubu(const value1, value2: short): short; static;
            class function ssubu(const value1, value2: short2): short2; static;
            class function ssubu(const value1, value2: short4): short4; static;
            class function ssubu(const value1, value2: short8): short8; static;
            class function sub(const value1, value2: byte2): byte2; static;
            class function sub(const value1, value2: byte4): byte4; static;
            class function sub(const value1, value2: byte8): byte8; static;
            class function sub(const value1, value2: short2): short2; static;
            class function sub(const value1, value2: short4): short4; static;
            class function sub(const value1, value2: short8): short8; static;
            class function sub(const value1, value2: int2): int2; static;
            class function sub(const value1, value2: int4): int4; static;
            class function sub(const value1, value2: int8): int8; static;
            class function sub(const value1, value2: long2): long2; static;
            class function sub(const value1, value2: long4): long4; static;
            class function sub(const value1, value2: long8): long8; static;
            class function sub(const value1, value2: float2): float2; static;
            class function sub(const value1, value2: float4): float4; static;
            class function sub(const value1, value2: float8): float8; static;
            class function sub(const value1, value2: double2): double2; static;
            class function sub(const value1, value2: double4): double4; static;
            class function sub(const value1, value2: double8): double8; static;
            class function &shl(const value: byte2; bits: int): byte2; static;
            class function &shl(const value: byte4; bits: int): byte4; static;
            class function &shl(const value: byte8; bits: int): byte8; static;
            class function &shl(const value: short2; bits: int): short2; static;
            class function &shl(const value: short4; bits: int): short4; static;
            class function &shl(const value: short8; bits: int): short8; static;
            class function &shl(const value: int2; bits: int): int2; static;
            class function &shl(const value: int4; bits: int): int4; static;
            class function &shl(const value: int8; bits: int): int8; static;
            class function &shl(const value: long2; bits: int): long2; static;
            class function &shl(const value: long4; bits: int): long4; static;
            class function &shl(const value: long8; bits: int): long8; static;
            class function sar(const value: byte2; bits: int): byte2; static;
            class function sar(const value: byte4; bits: int): byte4; static;
            class function sar(const value: byte8; bits: int): byte8; static;
            class function sar(const value: short2; bits: int): short2; static;
            class function sar(const value: short4; bits: int): short4; static;
            class function sar(const value: short8; bits: int): short8; static;
            class function sar(const value: int2; bits: int): int2; static;
            class function sar(const value: int4; bits: int): int4; static;
            class function sar(const value: int8; bits: int): int8; static;
            class function sar(const value: long2; bits: int): long2; static;
            class function sar(const value: long4; bits: int): long4; static;
            class function sar(const value: long8; bits: int): long8; static;
            class function &shr(const value: byte2; bits: int): byte2; static;
            class function &shr(const value: byte4; bits: int): byte4; static;
            class function &shr(const value: byte8; bits: int): byte8; static;
            class function &shr(const value: short2; bits: int): short2; static;
            class function &shr(const value: short4; bits: int): short4; static;
            class function &shr(const value: short8; bits: int): short8; static;
            class function &shr(const value: int2; bits: int): int2; static;
            class function &shr(const value: int4; bits: int): int4; static;
            class function &shr(const value: int8; bits: int): int8; static;
            class function &shr(const value: long2; bits: int): long2; static;
            class function &shr(const value: long4; bits: int): long4; static;
            class function &shr(const value: long8; bits: int): long8; static;
            class function newByte2(e0, e1: byte): byte2; static;
            class function newByte4(e0, e1, e2, e3: byte): byte4; static;
            class function newByte8(e0, e1, e2, e3, e4, e5, e6, e7: byte): byte8; static;
            class function newShort2(e0, e1: short): short2; static;
            class function newShort4(e0, e1, e2, e3: short): short4; static;
            class function newShort8(e0, e1, e2, e3, e4, e5, e6, e7: short): short8; static;
            class function newInt2(e0, e1: int): int2; static;
            class function newInt4(e0, e1, e2, e3: int): int4; static;
            class function newInt8(e0, e1, e2, e3, e4, e5, e6, e7: int): int8; static;
            class function newLong2(e0, e1: long): long2; static;
            class function newLong4(e0, e1, e2, e3: long): long4; static;
            class function newLong8(e0, e1, e2, e3, e4, e5, e6, e7: long): long8; static;
            class function newFloat2(e0, e1: float): float2; static;
            class function newFloat4(e0, e1, e2, e3: float): float4; static;
            class function newFloat8(e0, e1, e2, e3, e4, e5, e6, e7: float): float8; static;
            class function newDouble2(e0, e1: double): double2; static;
            class function newDouble4(e0, e1, e2, e3: double): double4; static;
            class function newDouble8(e0, e1, e2, e3, e4, e5, e6, e7: double): double8; static;
        end;

        {$CALLING REGISTER}

        VArray = class sealed
        public
            class procedure copyPrimitives(const srcArray: byte2_Array1d; srcOffset: int; const dstArray: byte2_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: byte4_Array1d; srcOffset: int; const dstArray: byte4_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: byte8_Array1d; srcOffset: int; const dstArray: byte8_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: short2_Array1d; srcOffset: int; const dstArray: short2_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: short4_Array1d; srcOffset: int; const dstArray: short4_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: short8_Array1d; srcOffset: int; const dstArray: short8_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: int2_Array1d; srcOffset: int; const dstArray: int2_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: int4_Array1d; srcOffset: int; const dstArray: int4_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: int8_Array1d; srcOffset: int; const dstArray: int8_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: long2_Array1d; srcOffset: int; const dstArray: long2_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: long4_Array1d; srcOffset: int; const dstArray: long4_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: long8_Array1d; srcOffset: int; const dstArray: long8_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: float2_Array1d; srcOffset: int; const dstArray: float2_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: float4_Array1d; srcOffset: int; const dstArray: float4_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: float8_Array1d; srcOffset: int; const dstArray: float8_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: double2_Array1d; srcOffset: int; const dstArray: double2_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: double4_Array1d; srcOffset: int; const dstArray: double4_Array1d; dstOffset: int; length: int); static;
            class procedure copyPrimitives(const srcArray: double8_Array1d; srcOffset: int; const dstArray: double8_Array1d; dstOffset: int; length: int); static;
            class function intersectBounds(const aarray; offset, length: int): int2; static;
            class function newByte2_1d(length: int): byte2_Array1d; static;
            class function newByte2_1d(const components: array of byte2): byte2_Array1d; static;
            class function newByte4_1d(length: int): byte4_Array1d; static;
            class function newByte4_1d(const components: array of byte4): byte4_Array1d; static;
            class function newByte8_1d(length: int): byte8_Array1d; static;
            class function newByte8_1d(const components: array of byte8): byte8_Array1d; static;
            class function newShort2_1d(length: int): short2_Array1d; static;
            class function newShort2_1d(const components: array of short2): short2_Array1d; static;
            class function newShort4_1d(length: int): short4_Array1d; static;
            class function newShort4_1d(const components: array of short4): short4_Array1d; static;
            class function newShort8_1d(length: int): short8_Array1d; static;
            class function newShort8_1d(const components: array of short8): short8_Array1d; static;
            class function newInt2_1d(length: int): int2_Array1d; static;
            class function newInt2_1d(const components: array of int2): int2_Array1d; static;
            class function newInt4_1d(length: int): int4_Array1d; static;
            class function newInt4_1d(const components: array of int4): int4_Array1d; static;
            class function newInt8_1d(length: int): int8_Array1d; static;
            class function newInt8_1d(const components: array of int8): int8_Array1d; static;
            class function newLong2_1d(length: int): long2_Array1d; static;
            class function newLong2_1d(const components: array of long2): long2_Array1d; static;
            class function newLong4_1d(length: int): long4_Array1d; static;
            class function newLong4_1d(const components: array of long4): long4_Array1d; static;
            class function newLong8_1d(length: int): long8_Array1d; static;
            class function newLong8_1d(const components: array of long8): long8_Array1d; static;
            class function newFloat2_1d(length: int): float2_Array1d; static;
            class function newFloat2_1d(const components: array of float2): float2_Array1d; static;
            class function newFloat4_1d(length: int): float4_Array1d; static;
            class function newFloat4_1d(const components: array of float4): float4_Array1d; static;
            class function newFloat8_1d(length: int): float8_Array1d; static;
            class function newFloat8_1d(const components: array of float8): float8_Array1d; static;
            class function newDouble2_1d(length: int): double2_Array1d; static;
            class function newDouble2_1d(const components: array of double2): double2_Array1d; static;
            class function newDouble4_1d(length: int): double4_Array1d; static;
            class function newDouble4_1d(const components: array of double4): double4_Array1d; static;
            class function newDouble8_1d(length: int): double8_Array1d; static;
            class function newDouble8_1d(const components: array of double8): double8_Array1d; static;
            class function newByte2_2d(length: int): byte2_Array2d; static;
            class function newByte2_2d(length1, length2: int): byte2_Array2d; static;
            class function newByte2_2d(const components: array of byte2_Array1d): byte2_Array2d; static;
            class function newByte4_2d(length: int): byte4_Array2d; static;
            class function newByte4_2d(length1, length2: int): byte4_Array2d; static;
            class function newByte4_2d(const components: array of byte4_Array1d): byte4_Array2d; static;
            class function newByte8_2d(length: int): byte8_Array2d; static;
            class function newByte8_2d(length1, length2: int): byte8_Array2d; static;
            class function newByte8_2d(const components: array of byte8_Array1d): byte8_Array2d; static;
            class function newShort2_2d(length: int): short2_Array2d; static;
            class function newShort2_2d(length1, length2: int): short2_Array2d; static;
            class function newShort2_2d(const components: array of short2_Array1d): short2_Array2d; static;
            class function newShort4_2d(length: int): short4_Array2d; static;
            class function newShort4_2d(length1, length2: int): short4_Array2d; static;
            class function newShort4_2d(const components: array of short4_Array1d): short4_Array2d; static;
            class function newShort8_2d(length: int): short8_Array2d; static;
            class function newShort8_2d(length1, length2: int): short8_Array2d; static;
            class function newShort8_2d(const components: array of short8_Array1d): short8_Array2d; static;
            class function newInt2_2d(length: int): int2_Array2d; static;
            class function newInt2_2d(length1, length2: int): int2_Array2d; static;
            class function newInt2_2d(const components: array of int2_Array1d): int2_Array2d; static;
            class function newInt4_2d(length: int): int4_Array2d; static;
            class function newInt4_2d(length1, length2: int): int4_Array2d; static;
            class function newInt4_2d(const components: array of int4_Array1d): int4_Array2d; static;
            class function newInt8_2d(length: int): int8_Array2d; static;
            class function newInt8_2d(length1, length2: int): int8_Array2d; static;
            class function newInt8_2d(const components: array of int8_Array1d): int8_Array2d; static;
            class function newLong2_2d(length: int): long2_Array2d; static;
            class function newLong2_2d(length1, length2: int): long2_Array2d; static;
            class function newLong2_2d(const components: array of long2_Array1d): long2_Array2d; static;
            class function newLong4_2d(length: int): long4_Array2d; static;
            class function newLong4_2d(length1, length2: int): long4_Array2d; static;
            class function newLong4_2d(const components: array of long4_Array1d): long4_Array2d; static;
            class function newLong8_2d(length: int): long8_Array2d; static;
            class function newLong8_2d(length1, length2: int): long8_Array2d; static;
            class function newLong8_2d(const components: array of long8_Array1d): long8_Array2d; static;
            class function newFloat2_2d(length: int): float2_Array2d; static;
            class function newFloat2_2d(length1, length2: int): float2_Array2d; static;
            class function newFloat2_2d(const components: array of float2_Array1d): float2_Array2d; static;
            class function newFloat4_2d(length: int): float4_Array2d; static;
            class function newFloat4_2d(length1, length2: int): float4_Array2d; static;
            class function newFloat4_2d(const components: array of float4_Array1d): float4_Array2d; static;
            class function newFloat8_2d(length: int): float8_Array2d; static;
            class function newFloat8_2d(length1, length2: int): float8_Array2d; static;
            class function newFloat8_2d(const components: array of float8_Array1d): float8_Array2d; static;
            class function newDouble2_2d(length: int): double2_Array2d; static;
            class function newDouble2_2d(length1, length2: int): double2_Array2d; static;
            class function newDouble2_2d(const components: array of double2_Array1d): double2_Array2d; static;
            class function newDouble4_2d(length: int): double4_Array2d; static;
            class function newDouble4_2d(length1, length2: int): double4_Array2d; static;
            class function newDouble4_2d(const components: array of double4_Array1d): double4_Array2d; static;
            class function newDouble8_2d(length: int): double8_Array2d; static;
            class function newDouble8_2d(length1, length2: int): double8_Array2d; static;
            class function newDouble8_2d(const components: array of double8_Array1d): double8_Array2d; static;
        end;

        {$IFDEF WINDOWS}{$CALLING STDCALL}{$ELSE}{$CALLING CDECL}{$ENDIF}
    {%endregion}

    {%region  byte2 operators}
        operator :=(const value: byte): byte2;
        operator +(const value: byte2): int2;
        operator -(const value: byte2): int2;
        operator <>(const value1, value2: byte2): boolean;
        operator =(const value1, value2: byte2): boolean;
        operator +(const value1, value2: byte2): int2;
        operator -(const value1, value2: byte2): int2;
        operator *(const value1, value2: byte2): int2;
        operator or(const value1, value2: byte2): byte2;
        operator xor(const value1, value2: byte2): byte2;
        operator and(const value1, value2: byte2): byte2;
        operator not(const value: byte2): byte2;
        operator shl(const value: byte2; bits: int): int2;
        operator shr(const value: byte2; bits: int): int2;
    {%endregion}

    {%region  byte4 operators}
        operator :=(const value: byte): byte4;
        operator :=(const value: byte2): byte4;
        operator +(const value: byte4): int4;
        operator -(const value: byte4): int4;
        operator <>(const value1, value2: byte4): boolean;
        operator =(const value1, value2: byte4): boolean;
        operator +(const value1, value2: byte4): int4;
        operator -(const value1, value2: byte4): int4;
        operator *(const value1, value2: byte4): int4;
        operator or(const value1, value2: byte4): byte4;
        operator xor(const value1, value2: byte4): byte4;
        operator and(const value1, value2: byte4): byte4;
        operator not(const value: byte4): byte4;
        operator shl(const value: byte4; bits: int): int4;
        operator shr(const value: byte4; bits: int): int4;
    {%endregion}

    {%region  byte8 operators}
        operator :=(const value: byte): byte8;
        operator :=(const value: byte2): byte8;
        operator :=(const value: byte4): byte8;
        operator +(const value: byte8): int8;
        operator -(const value: byte8): int8;
        operator <>(const value1, value2: byte8): boolean;
        operator =(const value1, value2: byte8): boolean;
        operator +(const value1, value2: byte8): int8;
        operator -(const value1, value2: byte8): int8;
        operator *(const value1, value2: byte8): int8;
        operator or(const value1, value2: byte8): byte8;
        operator xor(const value1, value2: byte8): byte8;
        operator and(const value1, value2: byte8): byte8;
        operator not(const value: byte8): byte8;
        operator shl(const value: byte8; bits: int): int8;
        operator shr(const value: byte8; bits: int): int8;
    {%endregion}

    {%region  short2 operators}
        operator :=(const value: byte2): short2;
        operator :=(const value: short): short2;
        operator +(const value: short2): int2;
        operator -(const value: short2): int2;
        operator <>(const value1, value2: short2): boolean;
        operator =(const value1, value2: short2): boolean;
        operator +(const value1, value2: short2): int2;
        operator -(const value1, value2: short2): int2;
        operator *(const value1, value2: short2): int2;
        operator or(const value1, value2: short2): short2;
        operator xor(const value1, value2: short2): short2;
        operator and(const value1, value2: short2): short2;
        operator not(const value: short2): short2;
        operator shl(const value: short2; bits: int): int2;
        operator shr(const value: short2; bits: int): int2;
    {%endregion}

    {%region  short4 operators}
        operator :=(const value: byte2): short4;
        operator :=(const value: byte4): short4;
        operator :=(const value: short): short4;
        operator :=(const value: short2): short4;
        operator +(const value: short4): int4;
        operator -(const value: short4): int4;
        operator <>(const value1, value2: short4): boolean;
        operator =(const value1, value2: short4): boolean;
        operator +(const value1, value2: short4): int4;
        operator -(const value1, value2: short4): int4;
        operator *(const value1, value2: short4): int4;
        operator or(const value1, value2: short4): short4;
        operator xor(const value1, value2: short4): short4;
        operator and(const value1, value2: short4): short4;
        operator not(const value: short4): short4;
        operator shl(const value: short4; bits: int): int4;
        operator shr(const value: short4; bits: int): int4;
    {%endregion}

    {%region  short8 operators}
        operator :=(const value: byte2): short8;
        operator :=(const value: byte4): short8;
        operator :=(const value: byte8): short8;
        operator :=(const value: short): short8;
        operator :=(const value: short2): short8;
        operator :=(const value: short4): short8;
        operator +(const value: short8): int8;
        operator -(const value: short8): int8;
        operator <>(const value1, value2: short8): boolean;
        operator =(const value1, value2: short8): boolean;
        operator +(const value1, value2: short8): int8;
        operator -(const value1, value2: short8): int8;
        operator *(const value1, value2: short8): int8;
        operator or(const value1, value2: short8): short8;
        operator xor(const value1, value2: short8): short8;
        operator and(const value1, value2: short8): short8;
        operator not(const value: short8): short8;
        operator shl(const value: short8; bits: int): int8;
        operator shr(const value: short8; bits: int): int8;
    {%endregion}

    {%region  int2 operators}
        operator :=(const value: byte2): int2;
        operator :=(const value: short2): int2;
        operator :=(const value: int): int2;
        operator +(const value: int2): int2;
        operator -(const value: int2): int2;
        operator <>(const value1, value2: int2): boolean;
        operator =(const value1, value2: int2): boolean;
        operator +(const value1, value2: int2): int2;
        operator -(const value1, value2: int2): int2;
        operator *(const value1, value2: int2): int2;
        operator or(const value1, value2: int2): int2;
        operator xor(const value1, value2: int2): int2;
        operator and(const value1, value2: int2): int2;
        operator not(const value: int2): int2;
        operator shl(const value: int2; bits: int): int2;
        operator shr(const value: int2; bits: int): int2;
    {%endregion}

    {%region  int4 operators}
        operator :=(const value: byte2): int4;
        operator :=(const value: byte4): int4;
        operator :=(const value: short2): int4;
        operator :=(const value: short4): int4;
        operator :=(const value: int): int4;
        operator :=(const value: int2): int4;
        operator +(const value: int4): int4;
        operator -(const value: int4): int4;
        operator <>(const value1, value2: int4): boolean;
        operator =(const value1, value2: int4): boolean;
        operator +(const value1, value2: int4): int4;
        operator -(const value1, value2: int4): int4;
        operator *(const value1, value2: int4): int4;
        operator or(const value1, value2: int4): int4;
        operator xor(const value1, value2: int4): int4;
        operator and(const value1, value2: int4): int4;
        operator not(const value: int4): int4;
        operator shl(const value: int4; bits: int): int4;
        operator shr(const value: int4; bits: int): int4;
    {%endregion}

    {%region  int8 operators}
        operator :=(const value: byte2): int8;
        operator :=(const value: byte4): int8;
        operator :=(const value: byte8): int8;
        operator :=(const value: short2): int8;
        operator :=(const value: short4): int8;
        operator :=(const value: short8): int8;
        operator :=(const value: int): int8;
        operator :=(const value: int2): int8;
        operator :=(const value: int4): int8;
        operator +(const value: int8): int8;
        operator -(const value: int8): int8;
        operator <>(const value1, value2: int8): boolean;
        operator =(const value1, value2: int8): boolean;
        operator +(const value1, value2: int8): int8;
        operator -(const value1, value2: int8): int8;
        operator *(const value1, value2: int8): int8;
        operator or(const value1, value2: int8): int8;
        operator xor(const value1, value2: int8): int8;
        operator and(const value1, value2: int8): int8;
        operator not(const value: int8): int8;
        operator shl(const value: int8; bits: int): int8;
        operator shr(const value: int8; bits: int): int8;
    {%endregion}

    {%region  long2 operators}
        operator :=(const value: byte2): long2;
        operator :=(const value: short2): long2;
        operator :=(const value: int2): long2;
        operator :=(const value: long): long2;
        operator +(const value: long2): long2;
        operator -(const value: long2): long2;
        operator <>(const value1, value2: long2): boolean;
        operator =(const value1, value2: long2): boolean;
        operator +(const value1, value2: long2): long2;
        operator -(const value1, value2: long2): long2;
        operator *(const value1, value2: long2): long2;
        operator or(const value1, value2: long2): long2;
        operator xor(const value1, value2: long2): long2;
        operator and(const value1, value2: long2): long2;
        operator not(const value: long2): long2;
        operator shl(const value: long2; bits: int): long2;
        operator shr(const value: long2; bits: int): long2;
    {%endregion}

    {%region  long4 operators}
        operator :=(const value: byte2): long4;
        operator :=(const value: byte4): long4;
        operator :=(const value: short2): long4;
        operator :=(const value: short4): long4;
        operator :=(const value: int2): long4;
        operator :=(const value: int4): long4;
        operator :=(const value: long): long4;
        operator :=(const value: long2): long4;
        operator +(const value: long4): long4;
        operator -(const value: long4): long4;
        operator <>(const value1, value2: long4): boolean;
        operator =(const value1, value2: long4): boolean;
        operator +(const value1, value2: long4): long4;
        operator -(const value1, value2: long4): long4;
        operator *(const value1, value2: long4): long4;
        operator or(const value1, value2: long4): long4;
        operator xor(const value1, value2: long4): long4;
        operator and(const value1, value2: long4): long4;
        operator not(const value: long4): long4;
        operator shl(const value: long4; bits: int): long4;
        operator shr(const value: long4; bits: int): long4;
    {%endregion}

    {%region  long8 operators}
        operator :=(const value: byte2): long8;
        operator :=(const value: byte4): long8;
        operator :=(const value: byte8): long8;
        operator :=(const value: short2): long8;
        operator :=(const value: short4): long8;
        operator :=(const value: short8): long8;
        operator :=(const value: int2): long8;
        operator :=(const value: int4): long8;
        operator :=(const value: int8): long8;
        operator :=(const value: long): long8;
        operator :=(const value: long2): long8;
        operator :=(const value: long4): long8;
        operator +(const value: long8): long8;
        operator -(const value: long8): long8;
        operator <>(const value1, value2: long8): boolean;
        operator =(const value1, value2: long8): boolean;
        operator +(const value1, value2: long8): long8;
        operator -(const value1, value2: long8): long8;
        operator *(const value1, value2: long8): long8;
        operator or(const value1, value2: long8): long8;
        operator xor(const value1, value2: long8): long8;
        operator and(const value1, value2: long8): long8;
        operator not(const value: long8): long8;
        operator shl(const value: long8; bits: int): long8;
        operator shr(const value: long8; bits: int): long8;
    {%endregion}

    {%region  float2 operators}
        operator :=(const value: byte2): float2;
        operator :=(const value: short2): float2;
        operator :=(const value: float): float2;
        operator +(const value: float2): float2;
        operator -(const value: float2): float2;
        operator <>(const value1, value2: float2): boolean;
        operator =(const value1, value2: float2): boolean;
        operator +(const value1, value2: float2): float2;
        operator -(const value1, value2: float2): float2;
        operator *(const value1, value2: float2): float2;
        operator /(const value1, value2: float2): float2;
    {%endregion}

    {%region  float4 operators}
        operator :=(const value: byte2): float4;
        operator :=(const value: byte4): float4;
        operator :=(const value: short2): float4;
        operator :=(const value: short4): float4;
        operator :=(const value: float): float4;
        operator :=(const value: float2): float4;
        operator +(const value: float4): float4;
        operator -(const value: float4): float4;
        operator <>(const value1, value2: float4): boolean;
        operator =(const value1, value2: float4): boolean;
        operator +(const value1, value2: float4): float4;
        operator -(const value1, value2: float4): float4;
        operator *(const value1, value2: float4): float4;
        operator /(const value1, value2: float4): float4;
    {%endregion}

    {%region  float8 operators}
        operator :=(const value: byte2): float8;
        operator :=(const value: byte4): float8;
        operator :=(const value: byte8): float8;
        operator :=(const value: short2): float8;
        operator :=(const value: short4): float8;
        operator :=(const value: short8): float8;
        operator :=(const value: float): float8;
        operator :=(const value: float2): float8;
        operator :=(const value: float4): float8;
        operator +(const value: float8): float8;
        operator -(const value: float8): float8;
        operator <>(const value1, value2: float8): boolean;
        operator =(const value1, value2: float8): boolean;
        operator +(const value1, value2: float8): float8;
        operator -(const value1, value2: float8): float8;
        operator *(const value1, value2: float8): float8;
        operator /(const value1, value2: float8): float8;
    {%endregion}

    {%region  double2 operators}
        operator :=(const value: byte2): double2;
        operator :=(const value: short2): double2;
        operator :=(const value: int2): double2;
        operator :=(const value: float2): double2;
        operator :=(const value: double): double2;
        operator +(const value: double2): double2;
        operator -(const value: double2): double2;
        operator <>(const value1, value2: double2): boolean;
        operator =(const value1, value2: double2): boolean;
        operator +(const value1, value2: double2): double2;
        operator -(const value1, value2: double2): double2;
        operator *(const value1, value2: double2): double2;
        operator /(const value1, value2: double2): double2;
    {%endregion}

    {%region  double4 operators}
        operator :=(const value: byte2): double4;
        operator :=(const value: byte4): double4;
        operator :=(const value: short2): double4;
        operator :=(const value: short4): double4;
        operator :=(const value: int2): double4;
        operator :=(const value: int4): double4;
        operator :=(const value: float2): double4;
        operator :=(const value: float4): double4;
        operator :=(const value: double): double4;
        operator :=(const value: double2): double4;
        operator +(const value: double4): double4;
        operator -(const value: double4): double4;
        operator <>(const value1, value2: double4): boolean;
        operator =(const value1, value2: double4): boolean;
        operator +(const value1, value2: double4): double4;
        operator -(const value1, value2: double4): double4;
        operator *(const value1, value2: double4): double4;
        operator /(const value1, value2: double4): double4;
    {%endregion}

    {%region  double8 operators}
        operator :=(const value: byte2): double8;
        operator :=(const value: byte4): double8;
        operator :=(const value: byte8): double8;
        operator :=(const value: short2): double8;
        operator :=(const value: short4): double8;
        operator :=(const value: short8): double8;
        operator :=(const value: int2): double8;
        operator :=(const value: int4): double8;
        operator :=(const value: int8): double8;
        operator :=(const value: float2): double8;
        operator :=(const value: float4): double8;
        operator :=(const value: float8): double8;
        operator :=(const value: double): double8;
        operator :=(const value: double2): double8;
        operator :=(const value: double4): double8;
        operator +(const value: double8): double8;
        operator -(const value: double8): double8;
        operator <>(const value1, value2: double8): boolean;
        operator =(const value1, value2: double8): boolean;
        operator +(const value1, value2: double8): double8;
        operator -(const value1, value2: double8): double8;
        operator *(const value1, value2: double8): double8;
        operator /(const value1, value2: double8): double8;
    {%endregion}

implementation

    {$R *.res}

    {$IFDEF WINDOWS}{$CALLING STDCALL}{$ELSE}{$CALLING CDECL}{$ENDIF}

    {%region} const
        AVO = 'avo';
    {%endregion}

    {%region  Cast }
        class function Cast.toByte2(const value: byte4): byte2; inline;
        begin
            result := byte2((@value)^);
        end;

        class function Cast.toByte2(const value: byte8): byte2; inline;
        begin
            result := byte2((@value)^);
        end;

        class function Cast.toByte2(const value: short2): byte2; external AVO name 'CastShort2ToByte2';

        class function Cast.toByte2(const value: short4): byte2; inline;
        begin
            result := toByte2(short2((@value)^));
        end;

        class function Cast.toByte2(const value: short8): byte2; inline;
        begin
            result := toByte2(short2((@value)^));
        end;

        class function Cast.toByte2(const value: int2): byte2; external AVO name 'CastInt2ToByte2';

        class function Cast.toByte2(const value: int4): byte2; inline;
        begin
            result := toByte2(int2((@value)^));
        end;

        class function Cast.toByte2(const value: int8): byte2; inline;
        begin
            result := toByte2(int2((@value)^));
        end;

        class function Cast.toByte2(const value: long2): byte2; external AVO name 'CastLong2ToByte2';

        class function Cast.toByte2(const value: long4): byte2; inline;
        begin
            result := toByte2(long2((@value)^));
        end;

        class function Cast.toByte2(const value: long8): byte2; inline;
        begin
            result := toByte2(long2((@value)^));
        end;

        class function Cast.toByte2(const value: float2): byte2; external AVO name 'CastFloat2ToByte2';

        class function Cast.toByte2(const value: float4): byte2; inline;
        begin
            result := toByte2(float2((@value)^));
        end;

        class function Cast.toByte2(const value: float8): byte2; inline;
        begin
            result := toByte2(float2((@value)^));
        end;

        class function Cast.toByte2(const value: double2): byte2; external AVO name 'CastDouble2ToByte2';

        class function Cast.toByte2(const value: double4): byte2; inline;
        begin
            result := toByte2(double2((@value)^));
        end;

        class function Cast.toByte2(const value: double8): byte2; inline;
        begin
            result := toByte2(double2((@value)^));
        end;

        class function Cast.toByte4(const value: byte8): byte4; inline;
        begin
            result := byte4((@value)^);
        end;

        class function Cast.toByte4(const value: short4): byte4; external AVO name 'CastShort4ToByte4';

        class function Cast.toByte4(const value: short8): byte4; inline;
        begin
            result := toByte4(short4((@value)^));
        end;

        class function Cast.toByte4(const value: int4): byte4; external AVO name 'CastInt4ToByte4';

        class function Cast.toByte4(const value: int8): byte4; inline;
        begin
            result := toByte4(int4((@value)^));
        end;

        class function Cast.toByte4(const value: long4): byte4; external AVO name 'CastLong4ToByte4';

        class function Cast.toByte4(const value: long8): byte4; inline;
        begin
            result := toByte4(long4((@value)^));
        end;

        class function Cast.toByte4(const value: float4): byte4; external AVO name 'CastFloat4ToByte4';

        class function Cast.toByte4(const value: float8): byte4; inline;
        begin
            result := toByte4(float4((@value)^));
        end;

        class function Cast.toByte4(const value: double4): byte4; external AVO name 'CastDouble4ToByte4';

        class function Cast.toByte4(const value: double8): byte4; inline;
        begin
            result := toByte4(double4((@value)^));
        end;

        class function Cast.toByte8(const value: short8): byte8; external AVO name 'CastShort8ToByte8';

        class function Cast.toByte8(const value: int8): byte8; external AVO name 'CastInt8ToByte8';

        class function Cast.toByte8(const value: long8): byte8; external AVO name 'CastLong8ToByte8';

        class function Cast.toByte8(const value: float8): byte8; external AVO name 'CastFloat8ToByte8';

        class function Cast.toByte8(const value: double8): byte8; external AVO name 'CastDouble8ToByte8';

        class function Cast.toShort2(const value: short4): short2; inline;
        begin
            result := short2((@value)^);
        end;

        class function Cast.toShort2(const value: short8): short2; inline;
        begin
            result := short2((@value)^);
        end;

        class function Cast.toShort2(const value: int2): short2; external AVO name 'CastInt2ToShort2';

        class function Cast.toShort2(const value: int4): short2; inline;
        begin
            result := toShort2(int2((@value)^));
        end;

        class function Cast.toShort2(const value: int8): short2; inline;
        begin
            result := toShort2(int2((@value)^));
        end;

        class function Cast.toShort2(const value: long2): short2; external AVO name 'CastLong2ToShort2';

        class function Cast.toShort2(const value: long4): short2; inline;
        begin
            result := toShort2(long2((@value)^));
        end;

        class function Cast.toShort2(const value: long8): short2; inline;
        begin
            result := toShort2(long2((@value)^));
        end;

        class function Cast.toShort2(const value: float2): short2; external AVO name 'CastFloat2ToShort2';

        class function Cast.toShort2(const value: float4): short2; inline;
        begin
            result := toShort2(float2((@value)^));
        end;

        class function Cast.toShort2(const value: float8): short2; inline;
        begin
            result := toShort2(float2((@value)^));
        end;

        class function Cast.toShort2(const value: double2): short2; external AVO name 'CastDouble2ToShort2';

        class function Cast.toShort2(const value: double4): short2; inline;
        begin
            result := toShort2(double2((@value)^));
        end;

        class function Cast.toShort2(const value: double8): short2; inline;
        begin
            result := toShort2(double2((@value)^));
        end;

        class function Cast.toShort4(const value: short8): short4; inline;
        begin
            result := short4((@value)^);
        end;

        class function Cast.toShort4(const value: int4): short4; external AVO name 'CastInt4ToShort4';

        class function Cast.toShort4(const value: int8): short4; inline;
        begin
            result := toShort4(int4((@value)^));
        end;

        class function Cast.toShort4(const value: long4): short4; external AVO name 'CastLong4ToShort4';

        class function Cast.toShort4(const value: long8): short4; inline;
        begin
            result := toShort4(long4((@value)^));
        end;

        class function Cast.toShort4(const value: float4): short4; external AVO name 'CastFloat4ToShort4';

        class function Cast.toShort4(const value: float8): short4; inline;
        begin
            result := toShort4(float4((@value)^));
        end;

        class function Cast.toShort4(const value: double4): short4; external AVO name 'CastDouble4ToShort4';

        class function Cast.toShort4(const value: double8): short4; inline;
        begin
            result := toShort4(double4((@value)^));
        end;

        class function Cast.toShort8(const value: int8): short8; external AVO name 'CastInt8ToShort8';

        class function Cast.toShort8(const value: long8): short8; external AVO name 'CastLong8ToShort8';

        class function Cast.toShort8(const value: float8): short8; external AVO name 'CastFloat8ToShort8';

        class function Cast.toShort8(const value: double8): short8; external AVO name 'CastDouble8ToShort8';

        class function Cast.toInt2(const value: int4): int2; inline;
        begin
            result := int2((@value)^);
        end;

        class function Cast.toInt2(const value: int8): int2; inline;
        begin
            result := int2((@value)^);
        end;

        class function Cast.toInt2(const value: long2): int2; external AVO name 'CastLong2ToInt2';

        class function Cast.toInt2(const value: long4): int2; inline;
        begin
            result := toInt2(long2((@value)^));
        end;

        class function Cast.toInt2(const value: long8): int2; inline;
        begin
            result := toInt2(long2((@value)^));
        end;

        class function Cast.toInt2(const value: float2): int2; external AVO name 'CastFloat2ToInt2';

        class function Cast.toInt2(const value: float4): int2; inline;
        begin
            result := toInt2(float2((@value)^));
        end;

        class function Cast.toInt2(const value: float8): int2; inline;
        begin
            result := toInt2(float2((@value)^));
        end;

        class function Cast.toInt2(const value: double2): int2; external AVO name 'CastDouble2ToInt2';

        class function Cast.toInt2(const value: double4): int2; inline;
        begin
            result := toInt2(double2((@value)^));
        end;

        class function Cast.toInt2(const value: double8): int2; inline;
        begin
            result := toInt2(double2((@value)^));
        end;

        class function Cast.toInt4(const value: int8): int4; inline;
        begin
            result := int4((@value)^);
        end;

        class function Cast.toInt4(const value: long4): int4; external AVO name 'CastLong4ToInt4';

        class function Cast.toInt4(const value: long8): int4; inline;
        begin
            result := toInt4(long4((@value)^));
        end;

        class function Cast.toInt4(const value: float4): int4; external AVO name 'CastFloat4ToInt4';

        class function Cast.toInt4(const value: float8): int4; inline;
        begin
            result := toInt4(float4((@value)^));
        end;

        class function Cast.toInt4(const value: double4): int4; external AVO name 'CastDouble4ToInt4';

        class function Cast.toInt4(const value: double8): int4; inline;
        begin
            result := toInt4(double4((@value)^));
        end;

        class function Cast.toInt8(const value: long8): int8; external AVO name 'CastLong8ToInt8';

        class function Cast.toInt8(const value: float8): int8; external AVO name 'CastFloat8ToInt8';

        class function Cast.toInt8(const value: double8): int8; external AVO name 'CastDouble8ToInt8';

        class function Cast.toLong2(const value: long4): long2; inline;
        begin
            result := long2((@value)^);
        end;

        class function Cast.toLong2(const value: long8): long2; inline;
        begin
            result := long2((@value)^);
        end;

        class function Cast.toLong2(const value: float2): long2; external AVO name 'CastFloat2ToLong2';

        class function Cast.toLong2(const value: float4): long2; inline;
        begin
            result := toLong2(float2((@value)^));
        end;

        class function Cast.toLong2(const value: float8): long2; inline;
        begin
            result := toLong2(float2((@value)^));
        end;

        class function Cast.toLong2(const value: double2): long2; external AVO name 'CastDouble2ToLong2';

        class function Cast.toLong2(const value: double4): long2; inline;
        begin
            result := toLong2(double2((@value)^));
        end;

        class function Cast.toLong2(const value: double8): long2; inline;
        begin
            result := toLong2(double2((@value)^));
        end;

        class function Cast.toLong4(const value: long8): long4; inline;
        begin
            result := long4((@value)^);
        end;

        class function Cast.toLong4(const value: float4): long4; external AVO name 'CastFloat4ToLong4';

        class function Cast.toLong4(const value: float8): long4; inline;
        begin
            result := toLong4(float4((@value)^));
        end;

        class function Cast.toLong4(const value: double4): long4; external AVO name 'CastDouble4ToLong4';

        class function Cast.toLong4(const value: double8): long4; inline;
        begin
            result := toLong4(double4((@value)^));
        end;

        class function Cast.toLong8(const value: float8): long8; external AVO name 'CastFloat8ToLong8';

        class function Cast.toLong8(const value: double8): long8; external AVO name 'CastDouble8ToLong8';

        class function Cast.toFloat2(const value: int2): float2; external AVO name 'CastInt2ToFloat2';

        class function Cast.toFloat2(const value: int4): float2; inline;
        begin
            result := toFloat2(int2((@value)^));
        end;

        class function Cast.toFloat2(const value: int8): float2; inline;
        begin
            result := toFloat2(int2((@value)^));
        end;

        class function Cast.toFloat2(const value: long2): float2; external AVO name 'CastLong2ToFloat2';

        class function Cast.toFloat2(const value: long4): float2; inline;
        begin
            result := toFloat2(long2((@value)^));
        end;

        class function Cast.toFloat2(const value: long8): float2; inline;
        begin
            result := toFloat2(long2((@value)^));
        end;

        class function Cast.toFloat2(const value: float4): float2; inline;
        begin
            result := float2((@value)^);
        end;

        class function Cast.toFloat2(const value: float8): float2; inline;
        begin
            result := float2((@value)^);
        end;

        class function Cast.toFloat2(const value: double2): float2; external AVO name 'CastDouble2ToFloat2';

        class function Cast.toFloat2(const value: double4): float2; inline;
        begin
            result := toFloat2(double2((@value)^));
        end;

        class function Cast.toFloat2(const value: double8): float2; inline;
        begin
            result := toFloat2(double2((@value)^));
        end;

        class function Cast.toFloat4(const value: int4): float4; external AVO name 'CastInt4ToFloat4';

        class function Cast.toFloat4(const value: int8): float4; inline;
        begin
            result := toFloat4(int4((@value)^));
        end;

        class function Cast.toFloat4(const value: long4): float4; external AVO name 'CastLong4ToFloat4';

        class function Cast.toFloat4(const value: long8): float4; inline;
        begin
            result := toFloat4(long4((@value)^));
        end;

        class function Cast.toFloat4(const value: float8): float4; inline;
        begin
            result := float4((@value)^);
        end;

        class function Cast.toFloat4(const value: double4): float4; external AVO name 'CastDouble4ToFloat4';

        class function Cast.toFloat4(const value: double8): float4; inline;
        begin
            result := toFloat4(double4((@value)^));
        end;

        class function Cast.toFloat8(const value: int8): float8; external AVO name 'CastInt8ToFloat8';

        class function Cast.toFloat8(const value: long8): float8; external AVO name 'CastLong8ToFloat8';

        class function Cast.toFloat8(const value: double8): float8; external AVO name 'CastDouble8ToFloat8';

        class function Cast.toDouble2(const value: long2): double2; external AVO name 'CastLong2ToDouble2';

        class function Cast.toDouble2(const value: long4): double2; inline;
        begin
            result := toDouble2(long2((@value)^));
        end;

        class function Cast.toDouble2(const value: long8): double2; inline;
        begin
            result := toDouble2(long2((@value)^));
        end;

        class function Cast.toDouble2(const value: double4): double2; inline;
        begin
            result := double2((@value)^);
        end;

        class function Cast.toDouble2(const value: double8): double2; inline;
        begin
            result := double2((@value)^);
        end;

        class function Cast.toDouble4(const value: long4): double4; external AVO name 'CastLong4ToDouble4';

        class function Cast.toDouble4(const value: long8): double4; inline;
        begin
            result := toDouble4(long4((@value)^));
        end;

        class function Cast.toDouble4(const value: double8): double4; inline;
        begin
            result := double4((@value)^);
        end;

        class function Cast.toDouble8(const value: long8): double8; external AVO name 'CastLong8ToDouble8';
    {%endregion}

    {%region  Scalar }
        class function Scalar.conj(const value: byte2): int2; inline;
        begin
            result := conj(int2(value));
        end;

        class function Scalar.conj(const value: byte4): int4; inline;
        begin
            result := conj(int4(value));
        end;

        class function Scalar.conj(const value: byte8): int8; inline;
        begin
            result := conj(int8(value));
        end;

        class function Scalar.conj(const value: short2): int2; inline;
        begin
            result := conj(int2(value));
        end;

        class function Scalar.conj(const value: short4): int4; inline;
        begin
            result := conj(int4(value));
        end;

        class function Scalar.conj(const value: short8): int8; inline;
        begin
            result := conj(int8(value));
        end;

        class function Scalar.conj(const value: int2): int2; external AVO name 'ScalarConjInt2';

        class function Scalar.conj(const value: int4): int4; external AVO name 'ScalarConjInt4';

        class function Scalar.conj(const value: int8): int8; external AVO name 'ScalarConjInt8';

        class function Scalar.conj(const value: long2): long2; external AVO name 'ScalarConjLong2';

        class function Scalar.conj(const value: long4): long4; external AVO name 'ScalarConjLong4';

        class function Scalar.conj(const value: long8): long8; external AVO name 'ScalarConjLong8';

        class function Scalar.conj(const value: float2): float2; external AVO name 'ScalarConjFloat2';

        class function Scalar.conj(const value: float4): float4; external AVO name 'ScalarConjFloat4';

        class function Scalar.conj(const value: float8): float8; external AVO name 'ScalarConjFloat8';

        class function Scalar.conj(const value: double2): double2; external AVO name 'ScalarConjDouble2';

        class function Scalar.conj(const value: double4): double4; external AVO name 'ScalarConjDouble4';

        class function Scalar.conj(const value: double8): double8; external AVO name 'ScalarConjDouble8';

        class function Scalar.sar(const value: byte2; bits: int): int2; inline;
        begin
            result := sar(int2(value), bits);
        end;

        class function Scalar.sar(const value: byte4; bits: int): int4; inline;
        begin
            result := sar(int4(value), bits);
        end;

        class function Scalar.sar(const value: byte8; bits: int): int8; inline;
        begin
            result := sar(int8(value), bits);
        end;

        class function Scalar.sar(const value: short2; bits: int): int2; inline;
        begin
            result := sar(int2(value), bits);
        end;

        class function Scalar.sar(const value: short4; bits: int): int4; inline;
        begin
            result := sar(int4(value), bits);
        end;

        class function Scalar.sar(const value: short8; bits: int): int8; inline;
        begin
            result := sar(int8(value), bits);
        end;

        class function Scalar.sar(const value: int2; bits: int): int2; external AVO name 'ScalarShrInt2';

        class function Scalar.sar(const value: int4; bits: int): int4; external AVO name 'ScalarShrInt4';

        class function Scalar.sar(const value: int8; bits: int): int8; external AVO name 'ScalarShrInt8';

        class function Scalar.sar(const value: long2; bits: int): long2; external AVO name 'ScalarShrLong2';

        class function Scalar.sar(const value: long4; bits: int): long4; external AVO name 'ScalarShrLong4';

        class function Scalar.sar(const value: long8; bits: int): long8; external AVO name 'ScalarShrLong8';

        class function Scalar.inv(const value: float2): float2; external AVO name 'ScalarInvFloat2';

        class function Scalar.inv(const value: float4): float4; external AVO name 'ScalarInvFloat4';

        class function Scalar.inv(const value: float8): float8; external AVO name 'ScalarInvFloat8';

        class function Scalar.inv(const value: double2): double2; external AVO name 'ScalarInvDouble2';

        class function Scalar.inv(const value: double4): double4; external AVO name 'ScalarInvDouble4';

        class function Scalar.inv(const value: double8): double8; external AVO name 'ScalarInvDouble8';
    {%endregion}

    {%region  Vector }
        class function Vector.isAVX512SupportedByCPU(): boolean; external AVO name 'IsAVX512SupportedByCPU';

        class function Vector.isAVX512SupportedByOS(): boolean; external AVO name 'IsAVX512SupportedByOS';

        class function Vector.pck(const value: short): byte; external AVO name 'VectorPackShort';

        class function Vector.pck(const value: short2): byte2; external AVO name 'VectorPackShort2';

        class function Vector.pck(const value: short4): byte4; external AVO name 'VectorPackShort4';

        class function Vector.pck(const value: short8): byte8; external AVO name 'VectorPackShort8';

        class function Vector.pck(const value: int): short; external AVO name 'VectorPackInt';

        class function Vector.pck(const value: int2): short2; external AVO name 'VectorPackInt2';

        class function Vector.pck(const value: int4): short4; external AVO name 'VectorPackInt4';

        class function Vector.pck(const value: int8): short8; external AVO name 'VectorPackInt8';

        class function Vector.pck(const value: long): int; external AVO name 'VectorPackLong';

        class function Vector.pck(const value: long2): int2; external AVO name 'VectorPackLong2';

        class function Vector.pck(const value: long4): int4; external AVO name 'VectorPackLong4';

        class function Vector.pck(const value: long8): int8; external AVO name 'VectorPackLong8';

        class function Vector.lup(const value: byte): short; external AVO name 'VectorLoUnpackByte';

        class function Vector.lup(const value: byte2): short2; external AVO name 'VectorLoUnpackByte2';

        class function Vector.lup(const value: byte4): short4; external AVO name 'VectorLoUnpackByte4';

        class function Vector.lup(const value: byte8): short8; external AVO name 'VectorLoUnpackByte8';

        class function Vector.lup(const value: short): int; external AVO name 'VectorLoUnpackShort';

        class function Vector.lup(const value: short2): int2; external AVO name 'VectorLoUnpackShort2';

        class function Vector.lup(const value: short4): int4; external AVO name 'VectorLoUnpackShort4';

        class function Vector.lup(const value: short8): int8; external AVO name 'VectorLoUnpackShort8';

        class function Vector.lup(const value: int): long; external AVO name 'VectorLoUnpackInt';

        class function Vector.lup(const value: int2): long2; external AVO name 'VectorLoUnpackInt2';

        class function Vector.lup(const value: int4): long4; external AVO name 'VectorLoUnpackInt4';

        class function Vector.lup(const value: int8): long8; external AVO name 'VectorLoUnpackInt8';

        class function Vector.uup(const value: byte): short; external AVO name 'VectorUpUnpackByte';

        class function Vector.uup(const value: byte2): short2; external AVO name 'VectorUpUnpackByte2';

        class function Vector.uup(const value: byte4): short4; external AVO name 'VectorUpUnpackByte4';

        class function Vector.uup(const value: byte8): short8; external AVO name 'VectorUpUnpackByte8';

        class function Vector.uup(const value: short): int; external AVO name 'VectorUpUnpackShort';

        class function Vector.uup(const value: short2): int2; external AVO name 'VectorUpUnpackShort2';

        class function Vector.uup(const value: short4): int4; external AVO name 'VectorUpUnpackShort4';

        class function Vector.uup(const value: short8): int8; external AVO name 'VectorUpUnpackShort8';

        class function Vector.uup(const value: int): long; external AVO name 'VectorUpUnpackInt';

        class function Vector.uup(const value: int2): long2; external AVO name 'VectorUpUnpackInt2';

        class function Vector.uup(const value: int4): long4; external AVO name 'VectorUpUnpackInt4';

        class function Vector.uup(const value: int8): long8; external AVO name 'VectorUpUnpackInt8';

        class function Vector.neg(const value: byte2): byte2; external AVO name 'VectorNegByte2';

        class function Vector.neg(const value: byte4): byte4; external AVO name 'VectorNegByte4';

        class function Vector.neg(const value: byte8): byte8; external AVO name 'VectorNegByte8';

        class function Vector.neg(const value: short2): short2; external AVO name 'VectorNegShort2';

        class function Vector.neg(const value: short4): short4; external AVO name 'VectorNegShort4';

        class function Vector.neg(const value: short8): short8; external AVO name 'VectorNegShort8';

        class function Vector.neg(const value: int2): int2; external AVO name 'VectorNegInt2';

        class function Vector.neg(const value: int4): int4; external AVO name 'VectorNegInt4';

        class function Vector.neg(const value: int8): int8; external AVO name 'VectorNegInt8';

        class function Vector.neg(const value: long2): long2; external AVO name 'VectorNegLong2';

        class function Vector.neg(const value: long4): long4; external AVO name 'VectorNegLong4';

        class function Vector.neg(const value: long8): long8; external AVO name 'VectorNegLong8';

        class function Vector.neg(const value: float2): float2; external AVO name 'VectorNegFloat2';

        class function Vector.neg(const value: float4): float4; external AVO name 'VectorNegFloat4';

        class function Vector.neg(const value: float8): float8; external AVO name 'VectorNegFloat8';

        class function Vector.neg(const value: double2): double2; external AVO name 'VectorNegDouble2';

        class function Vector.neg(const value: double4): double4; external AVO name 'VectorNegDouble4';

        class function Vector.neg(const value: double8): double8; external AVO name 'VectorNegDouble8';

        class function Vector.add(const value1, value2: byte2): byte2; external AVO name 'VectorAddByte2';

        class function Vector.add(const value1, value2: byte4): byte4; external AVO name 'VectorAddByte4';

        class function Vector.add(const value1, value2: byte8): byte8; external AVO name 'VectorAddByte8';

        class function Vector.add(const value1, value2: short2): short2; external AVO name 'VectorAddShort2';

        class function Vector.add(const value1, value2: short4): short4; external AVO name 'VectorAddShort4';

        class function Vector.add(const value1, value2: short8): short8; external AVO name 'VectorAddShort8';

        class function Vector.add(const value1, value2: int2): int2; external AVO name 'VectorAddInt2';

        class function Vector.add(const value1, value2: int4): int4; external AVO name 'VectorAddInt4';

        class function Vector.add(const value1, value2: int8): int8; external AVO name 'VectorAddInt8';

        class function Vector.add(const value1, value2: long2): long2; external AVO name 'VectorAddLong2';

        class function Vector.add(const value1, value2: long4): long4; external AVO name 'VectorAddLong4';

        class function Vector.add(const value1, value2: long8): long8; external AVO name 'VectorAddLong8';

        class function Vector.add(const value1, value2: float2): float2; external AVO name 'VectorAddFloat2';

        class function Vector.add(const value1, value2: float4): float4; external AVO name 'VectorAddFloat4';

        class function Vector.add(const value1, value2: float8): float8; external AVO name 'VectorAddFloat8';

        class function Vector.add(const value1, value2: double2): double2; external AVO name 'VectorAddDouble2';

        class function Vector.add(const value1, value2: double4): double4; external AVO name 'VectorAddDouble4';

        class function Vector.add(const value1, value2: double8): double8; external AVO name 'VectorAddDouble8';

        class function Vector.&div(const value1, value2: float2): float2; external AVO name 'VectorDivFloat2';

        class function Vector.&div(const value1, value2: float4): float4; external AVO name 'VectorDivFloat4';

        class function Vector.&div(const value1, value2: float8): float8; external AVO name 'VectorDivFloat8';

        class function Vector.&div(const value1, value2: double2): double2; external AVO name 'VectorDivDouble2';

        class function Vector.&div(const value1, value2: double4): double4; external AVO name 'VectorDivDouble4';

        class function Vector.&div(const value1, value2: double8): double8; external AVO name 'VectorDivDouble8';

        class function Vector.eq(const value1, value2: byte): byte; external AVO name 'VectorEqualsByte';

        class function Vector.eq(const value1, value2: byte2): byte2; external AVO name 'VectorEqualsByte2';

        class function Vector.eq(const value1, value2: byte4): byte4; external AVO name 'VectorEqualsByte4';

        class function Vector.eq(const value1, value2: byte8): byte8; external AVO name 'VectorEqualsByte8';

        class function Vector.eq(const value1, value2: short): short; external AVO name 'VectorEqualsShort';

        class function Vector.eq(const value1, value2: short2): short2; external AVO name 'VectorEqualsShort2';

        class function Vector.eq(const value1, value2: short4): short4; external AVO name 'VectorEqualsShort4';

        class function Vector.eq(const value1, value2: short8): short8; external AVO name 'VectorEqualsShort8';

        class function Vector.eq(const value1, value2: int): int; external AVO name 'VectorEqualsInt';

        class function Vector.eq(const value1, value2: int2): int2; external AVO name 'VectorEqualsInt2';

        class function Vector.eq(const value1, value2: int4): int4; external AVO name 'VectorEqualsInt4';

        class function Vector.eq(const value1, value2: int8): int8; external AVO name 'VectorEqualsInt8';

        class function Vector.eq(const value1, value2: long): long; external AVO name 'VectorEqualsLong';

        class function Vector.eq(const value1, value2: long2): long2; external AVO name 'VectorEqualsLong2';

        class function Vector.eq(const value1, value2: long4): long4; external AVO name 'VectorEqualsLong4';

        class function Vector.eq(const value1, value2: long8): long8; external AVO name 'VectorEqualsLong8';

        class function Vector.eq(const value1, value2: float): int; external AVO name 'VectorEqualsFloat';

        class function Vector.eq(const value1, value2: float2): int2; external AVO name 'VectorEqualsFloat2';

        class function Vector.eq(const value1, value2: float4): int4; external AVO name 'VectorEqualsFloat4';

        class function Vector.eq(const value1, value2: float8): int8; external AVO name 'VectorEqualsFloat8';

        class function Vector.eq(const value1, value2: double): long; external AVO name 'VectorEqualsDouble';

        class function Vector.eq(const value1, value2: double2): long2; external AVO name 'VectorEqualsDouble2';

        class function Vector.eq(const value1, value2: double4): long4; external AVO name 'VectorEqualsDouble4';

        class function Vector.eq(const value1, value2: double8): long8; external AVO name 'VectorEqualsDouble8';

        class function Vector.ge(const value1, value2: byte): byte; external AVO name 'VectorGreaterOrEqualsByte';

        class function Vector.ge(const value1, value2: byte2): byte2; external AVO name 'VectorGreaterOrEqualsByte2';

        class function Vector.ge(const value1, value2: byte4): byte4; external AVO name 'VectorGreaterOrEqualsByte4';

        class function Vector.ge(const value1, value2: byte8): byte8; external AVO name 'VectorGreaterOrEqualsByte8';

        class function Vector.ge(const value1, value2: short): short; external AVO name 'VectorGreaterOrEqualsShort';

        class function Vector.ge(const value1, value2: short2): short2; external AVO name 'VectorGreaterOrEqualsShort2';

        class function Vector.ge(const value1, value2: short4): short4; external AVO name 'VectorGreaterOrEqualsShort4';

        class function Vector.ge(const value1, value2: short8): short8; external AVO name 'VectorGreaterOrEqualsShort8';

        class function Vector.ge(const value1, value2: int): int; external AVO name 'VectorGreaterOrEqualsInt';

        class function Vector.ge(const value1, value2: int2): int2; external AVO name 'VectorGreaterOrEqualsInt2';

        class function Vector.ge(const value1, value2: int4): int4; external AVO name 'VectorGreaterOrEqualsInt4';

        class function Vector.ge(const value1, value2: int8): int8; external AVO name 'VectorGreaterOrEqualsInt8';

        class function Vector.ge(const value1, value2: long): long; external AVO name 'VectorGreaterOrEqualsLong';

        class function Vector.ge(const value1, value2: long2): long2; external AVO name 'VectorGreaterOrEqualsLong2';

        class function Vector.ge(const value1, value2: long4): long4; external AVO name 'VectorGreaterOrEqualsLong4';

        class function Vector.ge(const value1, value2: long8): long8; external AVO name 'VectorGreaterOrEqualsLong8';

        class function Vector.ge(const value1, value2: float): int; external AVO name 'VectorGreaterOrEqualsFloat';

        class function Vector.ge(const value1, value2: float2): int2; external AVO name 'VectorGreaterOrEqualsFloat2';

        class function Vector.ge(const value1, value2: float4): int4; external AVO name 'VectorGreaterOrEqualsFloat4';

        class function Vector.ge(const value1, value2: float8): int8; external AVO name 'VectorGreaterOrEqualsFloat8';

        class function Vector.ge(const value1, value2: double): long; external AVO name 'VectorGreaterOrEqualsDouble';

        class function Vector.ge(const value1, value2: double2): long2; external AVO name 'VectorGreaterOrEqualsDouble2';

        class function Vector.ge(const value1, value2: double4): long4; external AVO name 'VectorGreaterOrEqualsDouble4';

        class function Vector.ge(const value1, value2: double8): long8; external AVO name 'VectorGreaterOrEqualsDouble8';

        class function Vector.gt(const value1, value2: byte): byte; external AVO name 'VectorGreaterThanByte';

        class function Vector.gt(const value1, value2: byte2): byte2; external AVO name 'VectorGreaterThanByte2';

        class function Vector.gt(const value1, value2: byte4): byte4; external AVO name 'VectorGreaterThanByte4';

        class function Vector.gt(const value1, value2: byte8): byte8; external AVO name 'VectorGreaterThanByte8';

        class function Vector.gt(const value1, value2: short): short; external AVO name 'VectorGreaterThanShort';

        class function Vector.gt(const value1, value2: short2): short2; external AVO name 'VectorGreaterThanShort2';

        class function Vector.gt(const value1, value2: short4): short4; external AVO name 'VectorGreaterThanShort4';

        class function Vector.gt(const value1, value2: short8): short8; external AVO name 'VectorGreaterThanShort8';

        class function Vector.gt(const value1, value2: int): int; external AVO name 'VectorGreaterThanInt';

        class function Vector.gt(const value1, value2: int2): int2; external AVO name 'VectorGreaterThanInt2';

        class function Vector.gt(const value1, value2: int4): int4; external AVO name 'VectorGreaterThanInt4';

        class function Vector.gt(const value1, value2: int8): int8; external AVO name 'VectorGreaterThanInt8';

        class function Vector.gt(const value1, value2: long): long; external AVO name 'VectorGreaterThanLong';

        class function Vector.gt(const value1, value2: long2): long2; external AVO name 'VectorGreaterThanLong2';

        class function Vector.gt(const value1, value2: long4): long4; external AVO name 'VectorGreaterThanLong4';

        class function Vector.gt(const value1, value2: long8): long8; external AVO name 'VectorGreaterThanLong8';

        class function Vector.gt(const value1, value2: float): int; external AVO name 'VectorGreaterThanFloat';

        class function Vector.gt(const value1, value2: float2): int2; external AVO name 'VectorGreaterThanFloat2';

        class function Vector.gt(const value1, value2: float4): int4; external AVO name 'VectorGreaterThanFloat4';

        class function Vector.gt(const value1, value2: float8): int8; external AVO name 'VectorGreaterThanFloat8';

        class function Vector.gt(const value1, value2: double): long; external AVO name 'VectorGreaterThanDouble';

        class function Vector.gt(const value1, value2: double2): long2; external AVO name 'VectorGreaterThanDouble2';

        class function Vector.gt(const value1, value2: double4): long4; external AVO name 'VectorGreaterThanDouble4';

        class function Vector.gt(const value1, value2: double8): long8; external AVO name 'VectorGreaterThanDouble8';

        class function Vector.le(const value1, value2: byte): byte; external AVO name 'VectorLessOrEqualsByte';

        class function Vector.le(const value1, value2: byte2): byte2; external AVO name 'VectorLessOrEqualsByte2';

        class function Vector.le(const value1, value2: byte4): byte4; external AVO name 'VectorLessOrEqualsByte4';

        class function Vector.le(const value1, value2: byte8): byte8; external AVO name 'VectorLessOrEqualsByte8';

        class function Vector.le(const value1, value2: short): short; external AVO name 'VectorLessOrEqualsShort';

        class function Vector.le(const value1, value2: short2): short2; external AVO name 'VectorLessOrEqualsShort2';

        class function Vector.le(const value1, value2: short4): short4; external AVO name 'VectorLessOrEqualsShort4';

        class function Vector.le(const value1, value2: short8): short8; external AVO name 'VectorLessOrEqualsShort8';

        class function Vector.le(const value1, value2: int): int; external AVO name 'VectorLessOrEqualsInt';

        class function Vector.le(const value1, value2: int2): int2; external AVO name 'VectorLessOrEqualsInt2';

        class function Vector.le(const value1, value2: int4): int4; external AVO name 'VectorLessOrEqualsInt4';

        class function Vector.le(const value1, value2: int8): int8; external AVO name 'VectorLessOrEqualsInt8';

        class function Vector.le(const value1, value2: long): long; external AVO name 'VectorLessOrEqualsLong';

        class function Vector.le(const value1, value2: long2): long2; external AVO name 'VectorLessOrEqualsLong2';

        class function Vector.le(const value1, value2: long4): long4; external AVO name 'VectorLessOrEqualsLong4';

        class function Vector.le(const value1, value2: long8): long8; external AVO name 'VectorLessOrEqualsLong8';

        class function Vector.le(const value1, value2: float): int; external AVO name 'VectorLessOrEqualsFloat';

        class function Vector.le(const value1, value2: float2): int2; external AVO name 'VectorLessOrEqualsFloat2';

        class function Vector.le(const value1, value2: float4): int4; external AVO name 'VectorLessOrEqualsFloat4';

        class function Vector.le(const value1, value2: float8): int8; external AVO name 'VectorLessOrEqualsFloat8';

        class function Vector.le(const value1, value2: double): long; external AVO name 'VectorLessOrEqualsDouble';

        class function Vector.le(const value1, value2: double2): long2; external AVO name 'VectorLessOrEqualsDouble2';

        class function Vector.le(const value1, value2: double4): long4; external AVO name 'VectorLessOrEqualsDouble4';

        class function Vector.le(const value1, value2: double8): long8; external AVO name 'VectorLessOrEqualsDouble8';

        class function Vector.lt(const value1, value2: byte): byte; external AVO name 'VectorLessThanByte';

        class function Vector.lt(const value1, value2: byte2): byte2; external AVO name 'VectorLessThanByte2';

        class function Vector.lt(const value1, value2: byte4): byte4; external AVO name 'VectorLessThanByte4';

        class function Vector.lt(const value1, value2: byte8): byte8; external AVO name 'VectorLessThanByte8';

        class function Vector.lt(const value1, value2: short): short; external AVO name 'VectorLessThanShort';

        class function Vector.lt(const value1, value2: short2): short2; external AVO name 'VectorLessThanShort2';

        class function Vector.lt(const value1, value2: short4): short4; external AVO name 'VectorLessThanShort4';

        class function Vector.lt(const value1, value2: short8): short8; external AVO name 'VectorLessThanShort8';

        class function Vector.lt(const value1, value2: int): int; external AVO name 'VectorLessThanInt';

        class function Vector.lt(const value1, value2: int2): int2; external AVO name 'VectorLessThanInt2';

        class function Vector.lt(const value1, value2: int4): int4; external AVO name 'VectorLessThanInt4';

        class function Vector.lt(const value1, value2: int8): int8; external AVO name 'VectorLessThanInt8';

        class function Vector.lt(const value1, value2: long): long; external AVO name 'VectorLessThanLong';

        class function Vector.lt(const value1, value2: long2): long2; external AVO name 'VectorLessThanLong2';

        class function Vector.lt(const value1, value2: long4): long4; external AVO name 'VectorLessThanLong4';

        class function Vector.lt(const value1, value2: long8): long8; external AVO name 'VectorLessThanLong8';

        class function Vector.lt(const value1, value2: float): int; external AVO name 'VectorLessThanFloat';

        class function Vector.lt(const value1, value2: float2): int2; external AVO name 'VectorLessThanFloat2';

        class function Vector.lt(const value1, value2: float4): int4; external AVO name 'VectorLessThanFloat4';

        class function Vector.lt(const value1, value2: float8): int8; external AVO name 'VectorLessThanFloat8';

        class function Vector.lt(const value1, value2: double): long; external AVO name 'VectorLessThanDouble';

        class function Vector.lt(const value1, value2: double2): long2; external AVO name 'VectorLessThanDouble2';

        class function Vector.lt(const value1, value2: double4): long4; external AVO name 'VectorLessThanDouble4';

        class function Vector.lt(const value1, value2: double8): long8; external AVO name 'VectorLessThanDouble8';

        class function Vector.ne(const value1, value2: byte): byte; external AVO name 'VectorNotEqualsByte';

        class function Vector.ne(const value1, value2: byte2): byte2; external AVO name 'VectorNotEqualsByte2';

        class function Vector.ne(const value1, value2: byte4): byte4; external AVO name 'VectorNotEqualsByte4';

        class function Vector.ne(const value1, value2: byte8): byte8; external AVO name 'VectorNotEqualsByte8';

        class function Vector.ne(const value1, value2: short): short; external AVO name 'VectorNotEqualsShort';

        class function Vector.ne(const value1, value2: short2): short2; external AVO name 'VectorNotEqualsShort2';

        class function Vector.ne(const value1, value2: short4): short4; external AVO name 'VectorNotEqualsShort4';

        class function Vector.ne(const value1, value2: short8): short8; external AVO name 'VectorNotEqualsShort8';

        class function Vector.ne(const value1, value2: int): int; external AVO name 'VectorNotEqualsInt';

        class function Vector.ne(const value1, value2: int2): int2; external AVO name 'VectorNotEqualsInt2';

        class function Vector.ne(const value1, value2: int4): int4; external AVO name 'VectorNotEqualsInt4';

        class function Vector.ne(const value1, value2: int8): int8; external AVO name 'VectorNotEqualsInt8';

        class function Vector.ne(const value1, value2: long): long; external AVO name 'VectorNotEqualsLong';

        class function Vector.ne(const value1, value2: long2): long2; external AVO name 'VectorNotEqualsLong2';

        class function Vector.ne(const value1, value2: long4): long4; external AVO name 'VectorNotEqualsLong4';

        class function Vector.ne(const value1, value2: long8): long8; external AVO name 'VectorNotEqualsLong8';

        class function Vector.ne(const value1, value2: float): int; external AVO name 'VectorNotEqualsFloat';

        class function Vector.ne(const value1, value2: float2): int2; external AVO name 'VectorNotEqualsFloat2';

        class function Vector.ne(const value1, value2: float4): int4; external AVO name 'VectorNotEqualsFloat4';

        class function Vector.ne(const value1, value2: float8): int8; external AVO name 'VectorNotEqualsFloat8';

        class function Vector.ne(const value1, value2: double): long; external AVO name 'VectorNotEqualsDouble';

        class function Vector.ne(const value1, value2: double2): long2; external AVO name 'VectorNotEqualsDouble2';

        class function Vector.ne(const value1, value2: double4): long4; external AVO name 'VectorNotEqualsDouble4';

        class function Vector.ne(const value1, value2: double8): long8; external AVO name 'VectorNotEqualsDouble8';

        class function Vector.hmul(const value1, value2: byte): byte; external AVO name 'VectorHiMulByte';

        class function Vector.hmul(const value1, value2: byte2): byte2; external AVO name 'VectorHiMulByte2';

        class function Vector.hmul(const value1, value2: byte4): byte4; external AVO name 'VectorHiMulByte4';

        class function Vector.hmul(const value1, value2: byte8): byte8; external AVO name 'VectorHiMulByte8';

        class function Vector.hmul(const value1, value2: short): short; external AVO name 'VectorHiMulShort';

        class function Vector.hmul(const value1, value2: short2): short2; external AVO name 'VectorHiMulShort2';

        class function Vector.hmul(const value1, value2: short4): short4; external AVO name 'VectorHiMulShort4';

        class function Vector.hmul(const value1, value2: short8): short8; external AVO name 'VectorHiMulShort8';

        class function Vector.hmulu(const value1, value2: byte): byte; external AVO name 'VectorHiMuluByte';

        class function Vector.hmulu(const value1, value2: byte2): byte2; external AVO name 'VectorHiMuluByte2';

        class function Vector.hmulu(const value1, value2: byte4): byte4; external AVO name 'VectorHiMuluByte4';

        class function Vector.hmulu(const value1, value2: byte8): byte8; external AVO name 'VectorHiMuluByte8';

        class function Vector.hmulu(const value1, value2: short): short; external AVO name 'VectorHiMuluShort';

        class function Vector.hmulu(const value1, value2: short2): short2; external AVO name 'VectorHiMuluShort2';

        class function Vector.hmulu(const value1, value2: short4): short4; external AVO name 'VectorHiMuluShort4';

        class function Vector.hmulu(const value1, value2: short8): short8; external AVO name 'VectorHiMuluShort8';

        class function Vector.mul(const value1, value2: byte2): byte2; external AVO name 'VectorMulByte2';

        class function Vector.mul(const value1, value2: byte4): byte4; external AVO name 'VectorMulByte4';

        class function Vector.mul(const value1, value2: byte8): byte8; external AVO name 'VectorMulByte8';

        class function Vector.mul(const value1, value2: short2): short2; external AVO name 'VectorMulShort2';

        class function Vector.mul(const value1, value2: short4): short4; external AVO name 'VectorMulShort4';

        class function Vector.mul(const value1, value2: short8): short8; external AVO name 'VectorMulShort8';

        class function Vector.mul(const value1, value2: int2): int2; external AVO name 'VectorMulInt2';

        class function Vector.mul(const value1, value2: int4): int4; external AVO name 'VectorMulInt4';

        class function Vector.mul(const value1, value2: int8): int8; external AVO name 'VectorMulInt8';

        class function Vector.mul(const value1, value2: long2): long2; external AVO name 'VectorMulLong2';

        class function Vector.mul(const value1, value2: long4): long4; external AVO name 'VectorMulLong4';

        class function Vector.mul(const value1, value2: long8): long8; external AVO name 'VectorMulLong8';

        class function Vector.mul(const value1, value2: float2): float2; external AVO name 'VectorMulFloat2';

        class function Vector.mul(const value1, value2: float4): float4; external AVO name 'VectorMulFloat4';

        class function Vector.mul(const value1, value2: float8): float8; external AVO name 'VectorMulFloat8';

        class function Vector.mul(const value1, value2: double2): double2; external AVO name 'VectorMulDouble2';

        class function Vector.mul(const value1, value2: double4): double4; external AVO name 'VectorMulDouble4';

        class function Vector.mul(const value1, value2: double8): double8; external AVO name 'VectorMulDouble8';

        class function Vector.sadd(const value1, value2: byte): byte; external AVO name 'VectorSaturatedAddByte';

        class function Vector.sadd(const value1, value2: byte2): byte2; external AVO name 'VectorSaturatedAddByte2';

        class function Vector.sadd(const value1, value2: byte4): byte4; external AVO name 'VectorSaturatedAddByte4';

        class function Vector.sadd(const value1, value2: byte8): byte8; external AVO name 'VectorSaturatedAddByte8';

        class function Vector.sadd(const value1, value2: short): short; external AVO name 'VectorSaturatedAddShort';

        class function Vector.sadd(const value1, value2: short2): short2; external AVO name 'VectorSaturatedAddShort2';

        class function Vector.sadd(const value1, value2: short4): short4; external AVO name 'VectorSaturatedAddShort4';

        class function Vector.sadd(const value1, value2: short8): short8; external AVO name 'VectorSaturatedAddShort8';

        class function Vector.saddu(const value1, value2: byte): byte; external AVO name 'VectorSaturatedAdduByte';

        class function Vector.saddu(const value1, value2: byte2): byte2; external AVO name 'VectorSaturatedAdduByte2';

        class function Vector.saddu(const value1, value2: byte4): byte4; external AVO name 'VectorSaturatedAdduByte4';

        class function Vector.saddu(const value1, value2: byte8): byte8; external AVO name 'VectorSaturatedAdduByte8';

        class function Vector.saddu(const value1, value2: short): short; external AVO name 'VectorSaturatedAdduShort';

        class function Vector.saddu(const value1, value2: short2): short2; external AVO name 'VectorSaturatedAdduShort2';

        class function Vector.saddu(const value1, value2: short4): short4; external AVO name 'VectorSaturatedAdduShort4';

        class function Vector.saddu(const value1, value2: short8): short8; external AVO name 'VectorSaturatedAdduShort8';

        class function Vector.ssub(const value1, value2: byte): byte; external AVO name 'VectorSaturatedSubByte';

        class function Vector.ssub(const value1, value2: byte2): byte2; external AVO name 'VectorSaturatedSubByte2';

        class function Vector.ssub(const value1, value2: byte4): byte4; external AVO name 'VectorSaturatedSubByte4';

        class function Vector.ssub(const value1, value2: byte8): byte8; external AVO name 'VectorSaturatedSubByte8';

        class function Vector.ssub(const value1, value2: short): short; external AVO name 'VectorSaturatedSubShort';

        class function Vector.ssub(const value1, value2: short2): short2; external AVO name 'VectorSaturatedSubShort2';

        class function Vector.ssub(const value1, value2: short4): short4; external AVO name 'VectorSaturatedSubShort4';

        class function Vector.ssub(const value1, value2: short8): short8; external AVO name 'VectorSaturatedSubShort8';

        class function Vector.ssubu(const value1, value2: byte): byte; external AVO name 'VectorSaturatedSubuByte';

        class function Vector.ssubu(const value1, value2: byte2): byte2; external AVO name 'VectorSaturatedSubuByte2';

        class function Vector.ssubu(const value1, value2: byte4): byte4; external AVO name 'VectorSaturatedSubuByte4';

        class function Vector.ssubu(const value1, value2: byte8): byte8; external AVO name 'VectorSaturatedSubuByte8';

        class function Vector.ssubu(const value1, value2: short): short; external AVO name 'VectorSaturatedSubuShort';

        class function Vector.ssubu(const value1, value2: short2): short2; external AVO name 'VectorSaturatedSubuShort2';

        class function Vector.ssubu(const value1, value2: short4): short4; external AVO name 'VectorSaturatedSubuShort4';

        class function Vector.ssubu(const value1, value2: short8): short8; external AVO name 'VectorSaturatedSubuShort8';

        class function Vector.sub(const value1, value2: byte2): byte2; external AVO name 'VectorSubByte2';

        class function Vector.sub(const value1, value2: byte4): byte4; external AVO name 'VectorSubByte4';

        class function Vector.sub(const value1, value2: byte8): byte8; external AVO name 'VectorSubByte8';

        class function Vector.sub(const value1, value2: short2): short2; external AVO name 'VectorSubShort2';

        class function Vector.sub(const value1, value2: short4): short4; external AVO name 'VectorSubShort4';

        class function Vector.sub(const value1, value2: short8): short8; external AVO name 'VectorSubShort8';

        class function Vector.sub(const value1, value2: int2): int2; external AVO name 'VectorSubInt2';

        class function Vector.sub(const value1, value2: int4): int4; external AVO name 'VectorSubInt4';

        class function Vector.sub(const value1, value2: int8): int8; external AVO name 'VectorSubInt8';

        class function Vector.sub(const value1, value2: long2): long2; external AVO name 'VectorSubLong2';

        class function Vector.sub(const value1, value2: long4): long4; external AVO name 'VectorSubLong4';

        class function Vector.sub(const value1, value2: long8): long8; external AVO name 'VectorSubLong8';

        class function Vector.sub(const value1, value2: float2): float2; external AVO name 'VectorSubFloat2';

        class function Vector.sub(const value1, value2: float4): float4; external AVO name 'VectorSubFloat4';

        class function Vector.sub(const value1, value2: float8): float8; external AVO name 'VectorSubFloat8';

        class function Vector.sub(const value1, value2: double2): double2; external AVO name 'VectorSubDouble2';

        class function Vector.sub(const value1, value2: double4): double4; external AVO name 'VectorSubDouble4';

        class function Vector.sub(const value1, value2: double8): double8; external AVO name 'VectorSubDouble8';

        class function Vector.&shl(const value: byte2; bits: int): byte2; external AVO name 'VectorShlByte2';

        class function Vector.&shl(const value: byte4; bits: int): byte4; external AVO name 'VectorShlByte4';

        class function Vector.&shl(const value: byte8; bits: int): byte8; external AVO name 'VectorShlByte8';

        class function Vector.&shl(const value: short2; bits: int): short2; external AVO name 'VectorShlShort2';

        class function Vector.&shl(const value: short4; bits: int): short4; external AVO name 'VectorShlShort4';

        class function Vector.&shl(const value: short8; bits: int): short8; external AVO name 'VectorShlShort8';

        class function Vector.&shl(const value: int2; bits: int): int2; external AVO name 'VectorShlInt2';

        class function Vector.&shl(const value: int4; bits: int): int4; external AVO name 'VectorShlInt4';

        class function Vector.&shl(const value: int8; bits: int): int8; external AVO name 'VectorShlInt8';

        class function Vector.&shl(const value: long2; bits: int): long2; external AVO name 'VectorShlLong2';

        class function Vector.&shl(const value: long4; bits: int): long4; external AVO name 'VectorShlLong4';

        class function Vector.&shl(const value: long8; bits: int): long8; external AVO name 'VectorShlLong8';

        class function Vector.sar(const value: byte2; bits: int): byte2; external AVO name 'VectorShrByte2';

        class function Vector.sar(const value: byte4; bits: int): byte4; external AVO name 'VectorShrByte4';

        class function Vector.sar(const value: byte8; bits: int): byte8; external AVO name 'VectorShrByte8';

        class function Vector.sar(const value: short2; bits: int): short2; external AVO name 'VectorShrShort2';

        class function Vector.sar(const value: short4; bits: int): short4; external AVO name 'VectorShrShort4';

        class function Vector.sar(const value: short8; bits: int): short8; external AVO name 'VectorShrShort8';

        class function Vector.sar(const value: int2; bits: int): int2; external AVO name 'VectorShrInt2';

        class function Vector.sar(const value: int4; bits: int): int4; external AVO name 'VectorShrInt4';

        class function Vector.sar(const value: int8; bits: int): int8; external AVO name 'VectorShrInt8';

        class function Vector.sar(const value: long2; bits: int): long2; external AVO name 'VectorShrLong2';

        class function Vector.sar(const value: long4; bits: int): long4; external AVO name 'VectorShrLong4';

        class function Vector.sar(const value: long8; bits: int): long8; external AVO name 'VectorShrLong8';

        class function Vector.&shr(const value: byte2; bits: int): byte2; external AVO name 'VectorShruByte2';

        class function Vector.&shr(const value: byte4; bits: int): byte4; external AVO name 'VectorShruByte4';

        class function Vector.&shr(const value: byte8; bits: int): byte8; external AVO name 'VectorShruByte8';

        class function Vector.&shr(const value: short2; bits: int): short2; external AVO name 'VectorShruShort2';

        class function Vector.&shr(const value: short4; bits: int): short4; external AVO name 'VectorShruShort4';

        class function Vector.&shr(const value: short8; bits: int): short8; external AVO name 'VectorShruShort8';

        class function Vector.&shr(const value: int2; bits: int): int2; external AVO name 'VectorShruInt2';

        class function Vector.&shr(const value: int4; bits: int): int4; external AVO name 'VectorShruInt4';

        class function Vector.&shr(const value: int8; bits: int): int8; external AVO name 'VectorShruInt8';

        class function Vector.&shr(const value: long2; bits: int): long2; external AVO name 'VectorShruLong2';

        class function Vector.&shr(const value: long4; bits: int): long4; external AVO name 'VectorShruLong4';

        class function Vector.&shr(const value: long8; bits: int): long8; external AVO name 'VectorShruLong8';

        class function Vector.newByte2(e0, e1: byte): byte2; inline;
        begin
            result[0] := e0;
            result[1] := e1;
        end;

        class function Vector.newByte4(e0, e1, e2, e3: byte): byte4; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
        end;

        class function Vector.newByte8(e0, e1, e2, e3, e4, e5, e6, e7: byte): byte8; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
            result[4] := e4;
            result[5] := e5;
            result[6] := e6;
            result[7] := e7;
        end;

        class function Vector.newShort2(e0, e1: short): short2; inline;
        begin
            result[0] := e0;
            result[1] := e1;
        end;

        class function Vector.newShort4(e0, e1, e2, e3: short): short4; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
        end;

        class function Vector.newShort8(e0, e1, e2, e3, e4, e5, e6, e7: short): short8; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
            result[4] := e4;
            result[5] := e5;
            result[6] := e6;
            result[7] := e7;
        end;

        class function Vector.newInt2(e0, e1: int): int2; inline;
        begin
            result[0] := e0;
            result[1] := e1;
        end;

        class function Vector.newInt4(e0, e1, e2, e3: int): int4; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
        end;

        class function Vector.newInt8(e0, e1, e2, e3, e4, e5, e6, e7: int): int8; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
            result[4] := e4;
            result[5] := e5;
            result[6] := e6;
            result[7] := e7;
        end;

        class function Vector.newLong2(e0, e1: long): long2; inline;
        begin
            result[0] := e0;
            result[1] := e1;
        end;

        class function Vector.newLong4(e0, e1, e2, e3: long): long4; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
        end;

        class function Vector.newLong8(e0, e1, e2, e3, e4, e5, e6, e7: long): long8; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
            result[4] := e4;
            result[5] := e5;
            result[6] := e6;
            result[7] := e7;
        end;

        class function Vector.newFloat2(e0, e1: float): float2; inline;
        begin
            result[0] := e0;
            result[1] := e1;
        end;

        class function Vector.newFloat4(e0, e1, e2, e3: float): float4; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
        end;

        class function Vector.newFloat8(e0, e1, e2, e3, e4, e5, e6, e7: float): float8; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
            result[4] := e4;
            result[5] := e5;
            result[6] := e6;
            result[7] := e7;
        end;

        class function Vector.newDouble2(e0, e1: double): double2; inline;
        begin
            result[0] := e0;
            result[1] := e1;
        end;

        class function Vector.newDouble4(e0, e1, e2, e3: double): double4; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
        end;

        class function Vector.newDouble8(e0, e1, e2, e3, e4, e5, e6, e7: double): double8; inline;
        begin
            result[0] := e0;
            result[1] := e1;
            result[2] := e2;
            result[3] := e3;
            result[4] := e4;
            result[5] := e5;
            result[6] := e6;
            result[7] := e7;
        end;
    {%endregion}

    {$CALLING REGISTER}

    {%region  VArray }
        class procedure VArray.copyPrimitives(const srcArray: byte2_Array1d; srcOffset: int; const dstArray: byte2_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(byte2));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: byte4_Array1d; srcOffset: int; const dstArray: byte4_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(byte4));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: byte8_Array1d; srcOffset: int; const dstArray: byte8_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(byte8));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: short2_Array1d; srcOffset: int; const dstArray: short2_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(short2));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: short4_Array1d; srcOffset: int; const dstArray: short4_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(short4));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: short8_Array1d; srcOffset: int; const dstArray: short8_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(short8));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: int2_Array1d; srcOffset: int; const dstArray: int2_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(int2));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: int4_Array1d; srcOffset: int; const dstArray: int4_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(int4));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: int8_Array1d; srcOffset: int; const dstArray: int8_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(int8));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: long2_Array1d; srcOffset: int; const dstArray: long2_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(long2));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: long4_Array1d; srcOffset: int; const dstArray: long4_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(long4));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: long8_Array1d; srcOffset: int; const dstArray: long8_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(long8));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: float2_Array1d; srcOffset: int; const dstArray: float2_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(float2));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: float4_Array1d; srcOffset: int; const dstArray: float4_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(float4));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: float8_Array1d; srcOffset: int; const dstArray: float8_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(float8));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: double2_Array1d; srcOffset: int; const dstArray: double2_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(double2));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: double4_Array1d; srcOffset: int; const dstArray: double4_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(double4));
            end;
        end;

        class procedure VArray.copyPrimitives(const srcArray: double8_Array1d; srcOffset: int; const dstArray: double8_Array1d; dstOffset: int; length: int);
        begin
            if length > 0 then begin
                &Array.checkBounds(srcArray, srcOffset, length);
                &Array.checkBounds(dstArray, dstOffset, length);
                &Array.copyRaw(srcArray[srcOffset], dstArray[dstOffset], long(length) * sizeof(double8));
            end;
        end;

        class function VArray.intersectBounds(const aarray; offset, length: int): int2;
            function bound(value, min, max: int): int; inline;
            begin
                if value < min then begin
                    result := min;
                    exit;
                end;
                if value > max then begin
                    result := max;
                    exit;
                end;
                result := value;
            end;
        var
            limit: int;
            alength: int;
            endIndex: int;
            beginIndex: int;
            barray: boolean_Array1d absolute aarray;
        begin
            alength := system.length(barray);
            limit := offset + length;
            if limit < offset then begin
                result := bound(offset, 0, alength);
                exit;
            end;
            beginIndex := bound(offset, 0, alength);
            endIndex := bound(limit, 0, alength);
            result := Vector.newInt2(beginIndex, endIndex - beginIndex);
        end;

        class function VArray.newByte2_1d(length: int): byte2_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newByte2_1d(const components: array of byte2): byte2_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(byte2));
            end;
        end;

        class function VArray.newByte4_1d(length: int): byte4_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newByte4_1d(const components: array of byte4): byte4_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(byte4));
            end;
        end;

        class function VArray.newByte8_1d(length: int): byte8_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newByte8_1d(const components: array of byte8): byte8_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(byte8));
            end;
        end;

        class function VArray.newShort2_1d(length: int): short2_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newShort2_1d(const components: array of short2): short2_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(short2));
            end;
        end;

        class function VArray.newShort4_1d(length: int): short4_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newShort4_1d(const components: array of short4): short4_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(short4));
            end;
        end;

        class function VArray.newShort8_1d(length: int): short8_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newShort8_1d(const components: array of short8): short8_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(short8));
            end;
        end;

        class function VArray.newInt2_1d(length: int): int2_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newInt2_1d(const components: array of int2): int2_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(int2));
            end;
        end;

        class function VArray.newInt4_1d(length: int): int4_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newInt4_1d(const components: array of int4): int4_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(int4));
            end;
        end;

        class function VArray.newInt8_1d(length: int): int8_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newInt8_1d(const components: array of int8): int8_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(int8));
            end;
        end;

        class function VArray.newLong2_1d(length: int): long2_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newLong2_1d(const components: array of long2): long2_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(long2));
            end;
        end;

        class function VArray.newLong4_1d(length: int): long4_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newLong4_1d(const components: array of long4): long4_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(long4));
            end;
        end;

        class function VArray.newLong8_1d(length: int): long8_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newLong8_1d(const components: array of long8): long8_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(long8));
            end;
        end;

        class function VArray.newFloat2_1d(length: int): float2_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newFloat2_1d(const components: array of float2): float2_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(float2));
            end;
        end;

        class function VArray.newFloat4_1d(length: int): float4_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newFloat4_1d(const components: array of float4): float4_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(float4));
            end;
        end;

        class function VArray.newFloat8_1d(length: int): float8_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newFloat8_1d(const components: array of float8): float8_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(float8));
            end;
        end;

        class function VArray.newDouble2_1d(length: int): double2_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newDouble2_1d(const components: array of double2): double2_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(double2));
            end;
        end;

        class function VArray.newDouble4_1d(length: int): double4_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newDouble4_1d(const components: array of double4): double4_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(double4));
            end;
        end;

        class function VArray.newDouble8_1d(length: int): double8_Array1d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newDouble8_1d(const components: array of double8): double8_Array1d;
        var
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                &Array.copyRaw(components[0], result[0], long(len) * sizeof(double8));
            end;
        end;

        class function VArray.newByte2_2d(length: int): byte2_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newByte2_2d(length1, length2: int): byte2_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newByte2_2d(const components: array of byte2_Array1d): byte2_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newByte4_2d(length: int): byte4_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newByte4_2d(length1, length2: int): byte4_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newByte4_2d(const components: array of byte4_Array1d): byte4_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newByte8_2d(length: int): byte8_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newByte8_2d(length1, length2: int): byte8_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newByte8_2d(const components: array of byte8_Array1d): byte8_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newShort2_2d(length: int): short2_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newShort2_2d(length1, length2: int): short2_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newShort2_2d(const components: array of short2_Array1d): short2_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newShort4_2d(length: int): short4_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newShort4_2d(length1, length2: int): short4_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newShort4_2d(const components: array of short4_Array1d): short4_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newShort8_2d(length: int): short8_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newShort8_2d(length1, length2: int): short8_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newShort8_2d(const components: array of short8_Array1d): short8_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newInt2_2d(length: int): int2_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newInt2_2d(length1, length2: int): int2_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newInt2_2d(const components: array of int2_Array1d): int2_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newInt4_2d(length: int): int4_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newInt4_2d(length1, length2: int): int4_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newInt4_2d(const components: array of int4_Array1d): int4_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newInt8_2d(length: int): int8_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newInt8_2d(length1, length2: int): int8_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newInt8_2d(const components: array of int8_Array1d): int8_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newLong2_2d(length: int): long2_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newLong2_2d(length1, length2: int): long2_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newLong2_2d(const components: array of long2_Array1d): long2_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newLong4_2d(length: int): long4_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newLong4_2d(length1, length2: int): long4_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newLong4_2d(const components: array of long4_Array1d): long4_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newLong8_2d(length: int): long8_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newLong8_2d(length1, length2: int): long8_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newLong8_2d(const components: array of long8_Array1d): long8_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newFloat2_2d(length: int): float2_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newFloat2_2d(length1, length2: int): float2_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newFloat2_2d(const components: array of float2_Array1d): float2_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newFloat4_2d(length: int): float4_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newFloat4_2d(length1, length2: int): float4_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newFloat4_2d(const components: array of float4_Array1d): float4_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newFloat8_2d(length: int): float8_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newFloat8_2d(length1, length2: int): float8_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newFloat8_2d(const components: array of float8_Array1d): float8_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newDouble2_2d(length: int): double2_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newDouble2_2d(length1, length2: int): double2_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newDouble2_2d(const components: array of double2_Array1d): double2_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newDouble4_2d(length: int): double4_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newDouble4_2d(length1, length2: int): double4_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newDouble4_2d(const components: array of double4_Array1d): double4_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;

        class function VArray.newDouble8_2d(length: int): double8_Array2d;
        begin
            if length < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            setLength(result, length);
        end;

        class function VArray.newDouble8_2d(length1, length2: int): double8_Array2d;
        var
            idx: int;
        begin
            if (length1 or length2) < 0 then begin
                raise NegativeArraySizeException.create(AResource.readUnitResourceAsAnsiString(pascalx.lang.UNIT_NAME, 'negative-array-length'));
            end;
            result := nil;
            if length1 > 0 then begin
                setLength(result, length1);
                if length2 > 0 then begin
                    for idx := length1 - 1 downto 0 do setLength(result[idx], length2);
                end;
            end;
        end;

        class function VArray.newDouble8_2d(const components: array of double8_Array1d): double8_Array2d;
        var
            idx: int;
            len: int;
        begin
            result := nil;
            len := length(components);
            if len > 0 then begin
                setLength(result, len);
                for idx := len - 1 downto 0 do result[idx] := components[idx];
            end;
        end;
    {%endregion}

    {$IFDEF WINDOWS}{$CALLING STDCALL}{$ELSE}{$CALLING CDECL}{$ENDIF}

    {%region  byte2 operators}
        operator :=(const value: byte): byte2; inline;
        begin
            result[0] := value;
            result[1] := 0;
        end;

        operator +(const value: byte2): int2; inline;
        begin
            result := value;
        end;

        operator -(const value: byte2): int2; inline;
        begin
            result := -int2(value);
        end;

        operator <>(const value1, value2: byte2): boolean; inline;
        begin
            result := int2(value1) <> int2(value2);
        end;

        operator =(const value1, value2: byte2): boolean; inline;
        begin
            result := int2(value1) = int2(value2);
        end;

        operator +(const value1, value2: byte2): int2; inline;
        begin
            result := int2(value1) + int2(value2);
        end;

        operator -(const value1, value2: byte2): int2; inline;
        begin
            result := int2(value1) - int2(value2);
        end;

        operator *(const value1, value2: byte2): int2; inline;
        begin
            result := int2(value1) * int2(value2);
        end;

        operator or(const value1, value2: byte2): byte2; external AVO name 'BitOrByte2';

        operator xor(const value1, value2: byte2): byte2; external AVO name 'BitXorByte2';

        operator and(const value1, value2: byte2): byte2; external AVO name 'BitAndByte2';

        operator not(const value: byte2): byte2; external AVO name 'BitNotByte2';

        operator shl(const value: byte2; bits: int): int2; inline;
        begin
            result := int2(value) shl bits;
        end;

        operator shr(const value: byte2; bits: int): int2; inline;
        begin
            result := int2(value) shr bits;
        end;
    {%endregion}

    {%region  byte4 operators}
        operator :=(const value: byte): byte4; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
        end;

        operator :=(const value: byte2): byte4; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
        end;

        operator +(const value: byte4): int4; inline;
        begin
            result := value;
        end;

        operator -(const value: byte4): int4; inline;
        begin
            result := -int4(value);
        end;

        operator <>(const value1, value2: byte4): boolean; inline;
        begin
            result := int4(value1) <> int4(value2);
        end;

        operator =(const value1, value2: byte4): boolean; inline;
        begin
            result := int4(value1) = int4(value2);
        end;

        operator +(const value1, value2: byte4): int4; inline;
        begin
            result := int4(value1) + int4(value2);
        end;

        operator -(const value1, value2: byte4): int4; inline;
        begin
            result := int4(value1) - int4(value2);
        end;

        operator *(const value1, value2: byte4): int4; inline;
        begin
            result := int4(value1) * int4(value2);
        end;

        operator or(const value1, value2: byte4): byte4; external AVO name 'BitOrByte4';

        operator xor(const value1, value2: byte4): byte4; external AVO name 'BitXorByte4';

        operator and(const value1, value2: byte4): byte4; external AVO name 'BitAndByte4';

        operator not(const value: byte4): byte4; external AVO name 'BitNotByte4';

        operator shl(const value: byte4; bits: int): int4; inline;
        begin
            result := int4(value) shl bits;
        end;

        operator shr(const value: byte4; bits: int): int4; inline;
        begin
            result := int4(value) shr bits;
        end;
    {%endregion}

    {%region  byte8 operators}
        operator :=(const value: byte): byte8; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: byte2): byte8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: byte4): byte8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := value[2];
            result[3] := value[3];
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator +(const value: byte8): int8; inline;
        begin
            result := value;
        end;

        operator -(const value: byte8): int8; inline;
        begin
            result := -int8(value);
        end;

        operator <>(const value1, value2: byte8): boolean; inline;
        begin
            result := int8(value1) <> int8(value2);
        end;

        operator =(const value1, value2: byte8): boolean; inline;
        begin
            result := int8(value1) = int8(value2);
        end;

        operator +(const value1, value2: byte8): int8; inline;
        begin
            result := int8(value1) + int8(value2);
        end;

        operator -(const value1, value2: byte8): int8; inline;
        begin
            result := int8(value1) - int8(value2);
        end;

        operator *(const value1, value2: byte8): int8; inline;
        begin
            result := int8(value1) * int8(value2);
        end;

        operator or(const value1, value2: byte8): byte8; external AVO name 'BitOrByte8';

        operator xor(const value1, value2: byte8): byte8; external AVO name 'BitXorByte8';

        operator and(const value1, value2: byte8): byte8; external AVO name 'BitAndByte8';

        operator not(const value: byte8): byte8; external AVO name 'BitNotByte8';

        operator shl(const value: byte8; bits: int): int8; inline;
        begin
            result := int8(value) shl bits;
        end;

        operator shr(const value: byte8; bits: int): int8; inline;
        begin
            result := int8(value) shr bits;
        end;
    {%endregion}

    {%region  short2 operators}
        operator :=(const value: byte2): short2; external AVO name 'CastByte2ToShort2';

        operator :=(const value: short): short2; inline;
        begin
            result[0] := value;
            result[1] := 0;
        end;

        operator +(const value: short2): int2; inline;
        begin
            result := value;
        end;

        operator -(const value: short2): int2; inline;
        begin
            result := -int2(value);
        end;

        operator <>(const value1, value2: short2): boolean; inline;
        begin
            result := int2(value1) <> int2(value2);
        end;

        operator =(const value1, value2: short2): boolean; inline;
        begin
            result := int2(value1) = int2(value2);
        end;

        operator +(const value1, value2: short2): int2; inline;
        begin
            result := int2(value1) + int2(value2);
        end;

        operator -(const value1, value2: short2): int2; inline;
        begin
            result := int2(value1) - int2(value2);
        end;

        operator *(const value1, value2: short2): int2; inline;
        begin
            result := int2(value1) * int2(value2);
        end;

        operator or(const value1, value2: short2): short2; external AVO name 'BitOrShort2';

        operator xor(const value1, value2: short2): short2; external AVO name 'BitXorShort2';

        operator and(const value1, value2: short2): short2; external AVO name 'BitAndShort2';

        operator not(const value: short2): short2; external AVO name 'BitNotShort2';

        operator shl(const value: short2; bits: int): int2; inline;
        begin
            result := int2(value) shl bits;
        end;

        operator shr(const value: short2; bits: int): int2; inline;
        begin
            result := int2(value) shr bits;
        end;
    {%endregion}

    {%region  short4 operators}
        operator :=(const value: byte2): short4; inline;
        begin
            result := short2(value);
        end;

        operator :=(const value: byte4): short4; external AVO name 'CastByte4ToShort4';

        operator :=(const value: short): short4; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
        end;

        operator :=(const value: short2): short4; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
        end;

        operator +(const value: short4): int4; inline;
        begin
            result := value;
        end;

        operator -(const value: short4): int4; inline;
        begin
            result := -int4(value);
        end;

        operator <>(const value1, value2: short4): boolean; inline;
        begin
            result := int4(value1) <> int4(value2);
        end;

        operator =(const value1, value2: short4): boolean; inline;
        begin
            result := int4(value1) = int4(value2);
        end;

        operator +(const value1, value2: short4): int4; inline;
        begin
            result := int4(value1) + int4(value2);
        end;

        operator -(const value1, value2: short4): int4; inline;
        begin
            result := int4(value1) - int4(value2);
        end;

        operator *(const value1, value2: short4): int4; inline;
        begin
            result := int4(value1) * int4(value2);
        end;

        operator or(const value1, value2: short4): short4; external AVO name 'BitOrShort4';

        operator xor(const value1, value2: short4): short4; external AVO name 'BitXorShort4';

        operator and(const value1, value2: short4): short4; external AVO name 'BitAndShort4';

        operator not(const value: short4): short4; external AVO name 'BitNotShort4';

        operator shl(const value: short4; bits: int): int4; inline;
        begin
            result := int4(value) shl bits;
        end;

        operator shr(const value: short4; bits: int): int4; inline;
        begin
            result := int4(value) shr bits;
        end;
    {%endregion}

    {%region  short8 operators}
        operator :=(const value: byte2): short8; inline;
        begin
            result := short2(value);
        end;

        operator :=(const value: byte4): short8; inline;
        begin
            result := short4(value);
        end;

        operator :=(const value: byte8): short8; external AVO name 'CastByte8ToShort8';

        operator :=(const value: short): short8; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: short2): short8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: short4): short8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := value[2];
            result[3] := value[3];
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator +(const value: short8): int8; inline;
        begin
            result := value;
        end;

        operator -(const value: short8): int8; inline;
        begin
            result := -int8(value);
        end;

        operator <>(const value1, value2: short8): boolean; inline;
        begin
            result := int8(value1) <> int8(value2);
        end;

        operator =(const value1, value2: short8): boolean; inline;
        begin
            result := int8(value1) = int8(value2);
        end;

        operator +(const value1, value2: short8): int8; inline;
        begin
            result := int8(value1) + int8(value2);
        end;

        operator -(const value1, value2: short8): int8; inline;
        begin
            result := int8(value1) - int8(value2);
        end;

        operator *(const value1, value2: short8): int8; inline;
        begin
            result := int8(value1) * int8(value2);
        end;

        operator or(const value1, value2: short8): short8; external AVO name 'BitOrShort8';

        operator xor(const value1, value2: short8): short8; external AVO name 'BitXorShort8';

        operator and(const value1, value2: short8): short8; external AVO name 'BitAndShort8';

        operator not(const value: short8): short8; external AVO name 'BitNotShort8';

        operator shl(const value: short8; bits: int): int8; inline;
        begin
            result := int8(value) shl bits;
        end;

        operator shr(const value: short8; bits: int): int8; inline;
        begin
            result := int8(value) shr bits;
        end;
    {%endregion}

    {%region  int2 operators}
        operator :=(const value: byte2): int2; external AVO name 'CastByte2ToInt2';

        operator :=(const value: short2): int2; external AVO name 'CastShort2ToInt2';

        operator :=(const value: int): int2; inline;
        begin
            result[0] := value;
            result[1] := 0;
        end;

        operator +(const value: int2): int2; inline;
        begin
            result := value;
        end;

        operator -(const value: int2): int2; external AVO name 'ScalarNegInt2';

        operator <>(const value1, value2: int2): boolean; external AVO name 'ScalarNotEqualsInt2';

        operator =(const value1, value2: int2): boolean; external AVO name 'ScalarEqualsInt2';

        operator +(const value1, value2: int2): int2; external AVO name 'ScalarAddInt2';

        operator -(const value1, value2: int2): int2; external AVO name 'ScalarSubInt2';

        operator *(const value1, value2: int2): int2; external AVO name 'ScalarMulInt2';

        operator or(const value1, value2: int2): int2; external AVO name 'BitOrInt2';

        operator xor(const value1, value2: int2): int2; external AVO name 'BitXorInt2';

        operator and(const value1, value2: int2): int2; external AVO name 'BitAndInt2';

        operator not(const value: int2): int2; external AVO name 'BitNotInt2';

        operator shl(const value: int2; bits: int): int2; external AVO name 'ScalarShlInt2';

        operator shr(const value: int2; bits: int): int2; external AVO name 'ScalarShruInt2';
    {%endregion}

    {%region  int4 operators}
        operator :=(const value: byte2): int4; inline;
        begin
            result := int2(value);
        end;

        operator :=(const value: byte4): int4; external AVO name 'CastByte4ToInt4';

        operator :=(const value: short2): int4; inline;
        begin
            result := int2(value);
        end;

        operator :=(const value: short4): int4; external AVO name 'CastShort4ToInt4';

        operator :=(const value: int): int4; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
        end;

        operator :=(const value: int2): int4; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
        end;

        operator +(const value: int4): int4; inline;
        begin
            result := value;
        end;

        operator -(const value: int4): int4; external AVO name 'ScalarNegInt4';

        operator <>(const value1, value2: int4): boolean; external AVO name 'ScalarNotEqualsInt4';

        operator =(const value1, value2: int4): boolean; external AVO name 'ScalarEqualsInt4';

        operator +(const value1, value2: int4): int4; external AVO name 'ScalarAddInt4';

        operator -(const value1, value2: int4): int4; external AVO name 'ScalarSubInt4';

        operator *(const value1, value2: int4): int4; external AVO name 'ScalarMulInt4';

        operator or(const value1, value2: int4): int4; external AVO name 'BitOrInt4';

        operator xor(const value1, value2: int4): int4; external AVO name 'BitXorInt4';

        operator and(const value1, value2: int4): int4; external AVO name 'BitAndInt4';

        operator not(const value: int4): int4; external AVO name 'BitNotInt4';

        operator shl(const value: int4; bits: int): int4; external AVO name 'ScalarShlInt4';

        operator shr(const value: int4; bits: int): int4; external AVO name 'ScalarShruInt4';
    {%endregion}

    {%region  int8 operators}
        operator :=(const value: byte2): int8; inline;
        begin
            result := int2(value);
        end;

        operator :=(const value: byte4): int8; inline;
        begin
            result := int4(value);
        end;

        operator :=(const value: byte8): int8; external AVO name 'CastByte8ToInt8';

        operator :=(const value: short2): int8; inline;
        begin
            result := int2(value);
        end;

        operator :=(const value: short4): int8; inline;
        begin
            result := int4(value);
        end;

        operator :=(const value: short8): int8; external AVO name 'CastShort8ToInt8';

        operator :=(const value: int): int8; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: int2): int8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: int4): int8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := value[2];
            result[3] := value[3];
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator +(const value: int8): int8; inline;
        begin
            result := value;
        end;

        operator -(const value: int8): int8; external AVO name 'ScalarNegInt8';

        operator <>(const value1, value2: int8): boolean; external AVO name 'ScalarNotEqualsInt8';

        operator =(const value1, value2: int8): boolean; external AVO name 'ScalarEqualsInt8';

        operator +(const value1, value2: int8): int8; external AVO name 'ScalarAddInt8';

        operator -(const value1, value2: int8): int8; external AVO name 'ScalarSubInt8';

        operator *(const value1, value2: int8): int8; external AVO name 'ScalarMulInt8';

        operator or(const value1, value2: int8): int8; external AVO name 'BitOrInt8';

        operator xor(const value1, value2: int8): int8; external AVO name 'BitXorInt8';

        operator and(const value1, value2: int8): int8; external AVO name 'BitAndInt8';

        operator not(const value: int8): int8; external AVO name 'BitNotInt8';

        operator shl(const value: int8; bits: int): int8; external AVO name 'ScalarShlInt8';

        operator shr(const value: int8; bits: int): int8; external AVO name 'ScalarShruInt8';
    {%endregion}

    {%region  long2 operators}
        operator :=(const value: byte2): long2; external AVO name 'CastByte2ToLong2';

        operator :=(const value: short2): long2; external AVO name 'CastShort2ToLong2';

        operator :=(const value: int2): long2; external AVO name 'CastInt2ToLong2';

        operator :=(const value: long): long2; inline;
        begin
            result[0] := value;
            result[1] := 0;
        end;

        operator +(const value: long2): long2; inline;
        begin
            result := value;
        end;

        operator -(const value: long2): long2; external AVO name 'ScalarNegLong2';

        operator <>(const value1, value2: long2): boolean; external AVO name 'ScalarNotEqualsLong2';

        operator =(const value1, value2: long2): boolean; external AVO name 'ScalarEqualsLong2';

        operator +(const value1, value2: long2): long2; external AVO name 'ScalarAddLong2';

        operator -(const value1, value2: long2): long2; external AVO name 'ScalarSubLong2';

        operator *(const value1, value2: long2): long2; external AVO name 'ScalarMulLong2';

        operator or(const value1, value2: long2): long2; external AVO name 'BitOrLong2';

        operator xor(const value1, value2: long2): long2; external AVO name 'BitXorLong2';

        operator and(const value1, value2: long2): long2; external AVO name 'BitAndLong2';

        operator not(const value: long2): long2; external AVO name 'BitNotLong2';

        operator shl(const value: long2; bits: int): long2; external AVO name 'ScalarShlLong2';

        operator shr(const value: long2; bits: int): long2; external AVO name 'ScalarShruLong2';
    {%endregion}

    {%region  long4 operators}
        operator :=(const value: byte2): long4; inline;
        begin
            result := long2(value);
        end;

        operator :=(const value: byte4): long4; external AVO name 'CastByte4ToLong4';

        operator :=(const value: short2): long4; inline;
        begin
            result := long2(value);
        end;

        operator :=(const value: short4): long4; external AVO name 'CastShort4ToLong4';

        operator :=(const value: int2): long4; inline;
        begin
            result := long2(value);
        end;

        operator :=(const value: int4): long4; external AVO name 'CastInt4ToLong4';

        operator :=(const value: long): long4; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
        end;

        operator :=(const value: long2): long4; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
        end;

        operator +(const value: long4): long4; inline;
        begin
            result := value;
        end;

        operator -(const value: long4): long4; external AVO name 'ScalarNegLong4';

        operator <>(const value1, value2: long4): boolean; external AVO name 'ScalarNotEqualsLong4';

        operator =(const value1, value2: long4): boolean; external AVO name 'ScalarEqualsLong4';

        operator +(const value1, value2: long4): long4; external AVO name 'ScalarAddLong4';

        operator -(const value1, value2: long4): long4; external AVO name 'ScalarSubLong4';

        operator *(const value1, value2: long4): long4; external AVO name 'ScalarMulLong4';

        operator or(const value1, value2: long4): long4; external AVO name 'BitOrLong4';

        operator xor(const value1, value2: long4): long4; external AVO name 'BitXorLong4';

        operator and(const value1, value2: long4): long4; external AVO name 'BitAndLong4';

        operator not(const value: long4): long4; external AVO name 'BitNotLong4';

        operator shl(const value: long4; bits: int): long4; external AVO name 'ScalarShlLong4';

        operator shr(const value: long4; bits: int): long4; external AVO name 'ScalarShruLong4';
    {%endregion}

    {%region  long8 operators}
        operator :=(const value: byte2): long8; inline;
        begin
            result := long2(value);
        end;

        operator :=(const value: byte4): long8; inline;
        begin
            result := long4(value);
        end;

        operator :=(const value: byte8): long8; external AVO name 'CastByte8ToLong8';

        operator :=(const value: short2): long8; inline;
        begin
            result := long2(value);
        end;

        operator :=(const value: short4): long8; inline;
        begin
            result := long4(value);
        end;

        operator :=(const value: short8): long8; external AVO name 'CastShort8ToLong8';

        operator :=(const value: int2): long8; inline;
        begin
            result := long2(value);
        end;

        operator :=(const value: int4): long8; inline;
        begin
            result := long4(value);
        end;

        operator :=(const value: int8): long8; external AVO name 'CastInt8ToLong8';

        operator :=(const value: long): long8; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: long2): long8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: long4): long8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := value[2];
            result[3] := value[3];
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator +(const value: long8): long8; inline;
        begin
            result := value;
        end;

        operator -(const value: long8): long8; external AVO name 'ScalarNegLong8';

        operator <>(const value1, value2: long8): boolean; external AVO name 'ScalarNotEqualsLong8';

        operator =(const value1, value2: long8): boolean; external AVO name 'ScalarEqualsLong8';

        operator +(const value1, value2: long8): long8; external AVO name 'ScalarAddLong8';

        operator -(const value1, value2: long8): long8; external AVO name 'ScalarSubLong8';

        operator *(const value1, value2: long8): long8; external AVO name 'ScalarMulLong8';

        operator or(const value1, value2: long8): long8; external AVO name 'BitOrLong8';

        operator xor(const value1, value2: long8): long8; external AVO name 'BitXorLong8';

        operator and(const value1, value2: long8): long8; external AVO name 'BitAndLong8';

        operator not(const value: long8): long8; external AVO name 'BitNotLong8';

        operator shl(const value: long8; bits: int): long8; external AVO name 'ScalarShlLong8';

        operator shr(const value: long8; bits: int): long8; external AVO name 'ScalarShruLong8';
    {%endregion}

    {%region  float2 operators}
        operator :=(const value: byte2): float2; external AVO name 'CastByte2ToFloat2';

        operator :=(const value: short2): float2; external AVO name 'CastShort2ToFloat2';

        operator :=(const value: float): float2; inline;
        begin
            result[0] := value;
            result[1] := 0;
        end;

        operator +(const value: float2): float2; inline;
        begin
            result := value;
        end;

        operator -(const value: float2): float2; external AVO name 'ScalarNegFloat2';

        operator <>(const value1, value2: float2): boolean; external AVO name 'ScalarNotEqualsFloat2';

        operator =(const value1, value2: float2): boolean; external AVO name 'ScalarEqualsFloat2';

        operator +(const value1, value2: float2): float2; external AVO name 'ScalarAddFloat2';

        operator -(const value1, value2: float2): float2; external AVO name 'ScalarSubFloat2';

        operator *(const value1, value2: float2): float2; external AVO name 'ScalarMulFloat2';

        operator /(const value1, value2: float2): float2; external AVO name 'ScalarDivFloat2';
    {%endregion}

    {%region  float4 operators}
        operator :=(const value: byte2): float4; inline;
        begin
            result := float2(value);
        end;

        operator :=(const value: byte4): float4; external AVO name 'CastByte4ToFloat4';

        operator :=(const value: short2): float4; inline;
        begin
            result := float2(value);
        end;

        operator :=(const value: short4): float4; external AVO name 'CastShort4ToFloat4';

        operator :=(const value: float): float4; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
        end;

        operator :=(const value: float2): float4; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
        end;

        operator +(const value: float4): float4; inline;
        begin
            result := value;
        end;

        operator -(const value: float4): float4; external AVO name 'ScalarNegFloat4';

        operator <>(const value1, value2: float4): boolean; external AVO name 'ScalarNotEqualsFloat4';

        operator =(const value1, value2: float4): boolean; external AVO name 'ScalarEqualsFloat4';

        operator +(const value1, value2: float4): float4; external AVO name 'ScalarAddFloat4';

        operator -(const value1, value2: float4): float4; external AVO name 'ScalarSubFloat4';

        operator *(const value1, value2: float4): float4; external AVO name 'ScalarMulFloat4';

        operator /(const value1, value2: float4): float4; external AVO name 'ScalarDivFloat4';
    {%endregion}

    {%region  float8 operators}
        operator :=(const value: byte2): float8; inline;
        begin
            result := float2(value);
        end;

        operator :=(const value: byte4): float8; inline;
        begin
            result := float4(value);
        end;

        operator :=(const value: byte8): float8; external AVO name 'CastByte8ToFloat8';

        operator :=(const value: short2): float8; inline;
        begin
            result := float2(value);
        end;

        operator :=(const value: short4): float8; inline;
        begin
            result := float4(value);
        end;

        operator :=(const value: short8): float8; external AVO name 'CastShort8ToFloat8';

        operator :=(const value: float): float8; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: float2): float8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: float4): float8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := value[2];
            result[3] := value[3];
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator +(const value: float8): float8; inline;
        begin
            result := value;
        end;

        operator -(const value: float8): float8; external AVO name 'ScalarNegFloat8';

        operator <>(const value1, value2: float8): boolean; external AVO name 'ScalarNotEqualsFloat8';

        operator =(const value1, value2: float8): boolean; external AVO name 'ScalarEqualsFloat8';

        operator +(const value1, value2: float8): float8; external AVO name 'ScalarAddFloat8';

        operator -(const value1, value2: float8): float8; external AVO name 'ScalarSubFloat8';

        operator *(const value1, value2: float8): float8; external AVO name 'ScalarMulFloat8';

        operator /(const value1, value2: float8): float8; external AVO name 'ScalarDivFloat8';
    {%endregion}

    {%region  double2 operators}
        operator :=(const value: byte2): double2; external AVO name 'CastByte2ToDouble2';

        operator :=(const value: short2): double2; external AVO name 'CastShort2ToDouble2';

        operator :=(const value: int2): double2; external AVO name 'CastInt2ToDouble2';

        operator :=(const value: float2): double2; external AVO name 'CastFloat2ToDouble2';

        operator :=(const value: double): double2; inline;
        begin
            result[0] := value;
            result[1] := 0;
        end;

        operator +(const value: double2): double2; inline;
        begin
            result := value;
        end;

        operator -(const value: double2): double2; external AVO name 'ScalarNegDouble2';

        operator <>(const value1, value2: double2): boolean; external AVO name 'ScalarNotEqualsDouble2';

        operator =(const value1, value2: double2): boolean; external AVO name 'ScalarEqualsDouble2';

        operator +(const value1, value2: double2): double2; external AVO name 'ScalarAddDouble2';

        operator -(const value1, value2: double2): double2; external AVO name 'ScalarSubDouble2';

        operator *(const value1, value2: double2): double2; external AVO name 'ScalarMulDouble2';

        operator /(const value1, value2: double2): double2; external AVO name 'ScalarDivDouble2';
    {%endregion}

    {%region  double4 operators}
        operator :=(const value: byte2): double4; inline;
        begin
            result := double2(value);
        end;

        operator :=(const value: byte4): double4; external AVO name 'CastByte4ToDouble4';

        operator :=(const value: short2): double4; inline;
        begin
            result := double2(value);
        end;

        operator :=(const value: short4): double4; external AVO name 'CastShort4ToDouble4';

        operator :=(const value: int2): double4; inline;
        begin
            result := double2(value);
        end;

        operator :=(const value: int4): double4; external AVO name 'CastInt4ToDouble4';

        operator :=(const value: float2): double4; inline;
        begin
            result := double2(value);
        end;

        operator :=(const value: float4): double4; external AVO name 'CastFloat4ToDouble4';

        operator :=(const value: double): double4; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
        end;

        operator :=(const value: double2): double4; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
        end;

        operator +(const value: double4): double4; inline;
        begin
            result := value;
        end;

        operator -(const value: double4): double4; external AVO name 'ScalarNegDouble4';

        operator <>(const value1, value2: double4): boolean; external AVO name 'ScalarNotEqualsDouble4';

        operator =(const value1, value2: double4): boolean; external AVO name 'ScalarEqualsDouble4';

        operator +(const value1, value2: double4): double4; external AVO name 'ScalarAddDouble4';

        operator -(const value1, value2: double4): double4; external AVO name 'ScalarSubDouble4';

        operator *(const value1, value2: double4): double4; external AVO name 'ScalarMulDouble4';

        operator /(const value1, value2: double4): double4; external AVO name 'ScalarDivDouble4';
    {%endregion}

    {%region  double8 operators}
        operator :=(const value: byte2): double8; inline;
        begin
            result := double2(value);
        end;

        operator :=(const value: byte4): double8; inline;
        begin
            result := double4(value);
        end;

        operator :=(const value: byte8): double8; external AVO name 'CastByte8ToDouble8';

        operator :=(const value: short2): double8; inline;
        begin
            result := double2(value);
        end;

        operator :=(const value: short4): double8; inline;
        begin
            result := double4(value);
        end;

        operator :=(const value: short8): double8; external AVO name 'CastShort8ToDouble8';

        operator :=(const value: int2): double8; inline;
        begin
            result := double2(value);
        end;

        operator :=(const value: int4): double8; inline;
        begin
            result := double4(value);
        end;

        operator :=(const value: int8): double8; external AVO name 'CastInt8ToDouble8';

        operator :=(const value: float2): double8; inline;
        begin
            result := double2(value);
        end;

        operator :=(const value: float4): double8; inline;
        begin
            result := double4(value);
        end;

        operator :=(const value: float8): double8; external AVO name 'CastFloat8ToDouble8';

        operator :=(const value: double): double8; inline;
        begin
            result[0] := value;
            result[1] := 0;
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: double2): double8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := 0;
            result[3] := 0;
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator :=(const value: double4): double8; inline;
        begin
            result[0] := value[0];
            result[1] := value[1];
            result[2] := value[2];
            result[3] := value[3];
            result[4] := 0;
            result[5] := 0;
            result[6] := 0;
            result[7] := 0;
        end;

        operator +(const value: double8): double8; inline;
        begin
            result := value;
        end;

        operator -(const value: double8): double8; external AVO name 'ScalarNegDouble8';

        operator <>(const value1, value2: double8): boolean; external AVO name 'ScalarNotEqualsDouble8';

        operator =(const value1, value2: double8): boolean; external AVO name 'ScalarEqualsDouble8';

        operator +(const value1, value2: double8): double8; external AVO name 'ScalarAddDouble8';

        operator -(const value1, value2: double8): double8; external AVO name 'ScalarSubDouble8';

        operator *(const value1, value2: double8): double8; external AVO name 'ScalarMulDouble8';

        operator /(const value1, value2: double8): double8; external AVO name 'ScalarDivDouble8';
    {%endregion}

end.