ymd-h/veclib-zig
SIMD based Vector Library for Zig
WARNING This project is still under development.
veclib utilizes Zig standard SIMD vector calculation. Aside from the standard, veclib supports scalar-vector mixed calculation and runtime-known length slice handling.
iotaf(comptime T: type, arg: anytype, out: []T) void)copysqrtsin, cos, tanexp, exp2, exp1mlog, log2, log10, log1pabsfloor, ceil, trunc, roundbyteSwap, bitReversecountLeadingZeros, countTrailingZeros, popCountf(comptime T: type, arg1: anytype, arg2: anytype, out: []T) void)add, wrapAdd, saturateAddsub, wrapSub, saturateSubmul, wrapMul, saturateMul,div, divFloor, divTrunc, rem, modbitAnd, bitOr, bitXormin, maxf(comptime T: type, arg1: anytype, arg2: anytype, out: [] bool) void)eq, neq, gt, gte, lt, lte,f(comptime T: type, arg1: anytype, arg2: anytype, arg3: anytype, out: []T))mulAddclipf(comptime T: type, arg: []const T) T)sum, wrapSum, saturateSum,prod, wrapProd, saturateProd,smallest, largest,all, anyWe use anytype for type inference, however, there some limitations.
arg at element-wise functions can be scalar or slice.