Exemplo n.º 1
0
        public static void Add(ReadOnlySpan <float> src, Span <float> dst, int count)
        {
            Contracts.AssertNonEmpty(src);
            Contracts.Assert(0 < count && count <= src.Length);
            Contracts.AssertNonEmpty(dst);
            Contracts.Assert(count <= dst.Length);

            unsafe
            {
                fixed(float *ps = &MemoryMarshal.GetReference(src))
                fixed(float *pd = &MemoryMarshal.GetReference(dst))
                Thunk.AddU(ps, pd, count);
            }
        }
Exemplo n.º 2
0
        public static void Add(float[] src, float[] dst, int count)
        {
            Contracts.AssertNonEmpty(src);
            Contracts.Assert(0 < count && count <= src.Length);
            Contracts.AssertNonEmpty(dst);
            Contracts.Assert(count <= dst.Length);

            unsafe
            {
                fixed(float *ps = &src[0])
                fixed(float *pd = &dst[0])
                Thunk.AddU(ps, pd, count);
            }
        }