public static Vec512 <T> CpuVec512 <T>(this IPolyrand random, Interval <T>?domain = null, Func <T, bool> filter = null) where T : unmanaged { var v1 = random.CpuVec256(domain, filter); var v2 = random.CpuVec256(domain, filter); return(Vec512.FromParts(v1, v2)); }
public static Span256 <T> ToSpan256 <T>(this Vec512 <T> src) where T : struct { var dst = Span256.AllocBlocks <T>(2); vstore(src.lo, ref dst[0]); vstore(src.hi, ref dst[32]); return(dst); }
public static ReadOnlySpan <T> ToReadOnlySpan <T>(this Vec512 <T> src) where T : struct => src.ToSpan();
public static unsafe Span <T> ToSpan <T>(this Vec512 <T> src) where T : struct => new Span <T>(As.pvoid(ref Unsafe.Add(ref src, 0)), Vec512 <T> .Length);
public static string FormatHexBlocks <T>(this Vec512 <T> src) where T : struct => src.FormatHex(false, AsciSym.Space);
public static string FormatHex <T>(this Vec512 <T> src, bool vectorize = true, char?sep = null) where T : struct => src.ToSpan().FormatHex(vectorize, sep);
public static string FormatBits <T>(this Vec512 <T> src, bool tlz = false, bool specifier = false, int?blockWidth = null) where T : struct => src.ToReadOnlySpan().FormatBits(tlz, specifier, blockWidth);