Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public static ReadOnlySpan <T> ToReadOnlySpan <T>(this Vec512 <T> src)
     where T : struct
 => src.ToSpan();
Ejemplo n.º 4
0
 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);
Ejemplo n.º 5
0
 public static string FormatHexBlocks <T>(this Vec512 <T> src)
     where T : struct
 => src.FormatHex(false, AsciSym.Space);
Ejemplo n.º 6
0
 public static string FormatHex <T>(this Vec512 <T> src, bool vectorize = true, char?sep = null)
     where T : struct
 => src.ToSpan().FormatHex(vectorize, sep);
Ejemplo n.º 7
0
 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);