|
@@ -32,6 +32,15 @@ namespace SIMDFxpConvert
|
|
|
ptr[i] = value;
|
|
|
}
|
|
|
}
|
|
|
+ public unsafe void Fill(ref double result, double value, uint count)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ double* ptr = (double*)Unsafe.AsPointer(ref result);
|
|
|
+ for (int i = 0; i < count; i++)
|
|
|
+ {
|
|
|
+ ptr[i] = value;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
public sealed class SIMDArraySum : IArraySum
|
|
|
{
|
|
@@ -241,6 +250,116 @@ namespace SIMDFxpConvert
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void Add(ref double left, double right, uint count, ref double result)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ ref var desc = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref result);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ var rightarray = Enumerable.Repeat(right, (int)onecount).ToArray();
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref rightarray[0]);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref desc, i);
|
|
|
+ tempdesc = Unsafe.Add(ref source, i) + tempright;
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* resultptr = (double*)Unsafe.AsPointer(ref result);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ resultptr[start + i] = leftptr[start + i] + right;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Add(ref double left, ref double right, uint count, ref double result)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ ref var desc = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref result);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref right);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref desc, i);
|
|
|
+ tempdesc = Unsafe.Add(ref source, i) + Unsafe.Add(ref tempright, i);
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* resultptr = (double*)Unsafe.AsPointer(ref result);
|
|
|
+ double* rightptr = (double*)Unsafe.AsPointer(ref right);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ resultptr[start + i] = leftptr[start + i] + rightptr[start + i];
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Add(ref double left, double right, uint count)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ var rightarray = Enumerable.Repeat(right, (int)onecount).ToArray();
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref rightarray[0]);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref source, i);
|
|
|
+ tempdesc += tempright;
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ leftptr[start + i] += right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Add(ref double left, ref double right, uint count)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref right);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref source, i);
|
|
|
+ tempdesc += Unsafe.Add(ref tempright, i);
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* rightptr = (double*)Unsafe.AsPointer(ref right);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ leftptr[start + i] += rightptr[start + i];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
public unsafe sealed class SIMDSubtract : ISubtract
|
|
|
{
|
|
@@ -349,6 +468,115 @@ namespace SIMDFxpConvert
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void Subtract(ref double left, double right, uint count, ref double result)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ ref var desc = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref result);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ var rightarray = Enumerable.Repeat(right, (int)onecount).ToArray();
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref rightarray[0]);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref desc, i);
|
|
|
+ tempdesc = Unsafe.Add(ref source, i) - tempright;
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* resultptr = (double*)Unsafe.AsPointer(ref result);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ resultptr[start + i] = leftptr[start + i] - right;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Subtract(ref double left, ref double right, uint count, ref double result)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ ref var desc = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref result);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref right);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref desc, i);
|
|
|
+ tempdesc = Unsafe.Add(ref source, i) - Unsafe.Add(ref tempright, i);
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* resultptr = (double*)Unsafe.AsPointer(ref result);
|
|
|
+ double* rightptr = (double*)Unsafe.AsPointer(ref right);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ resultptr[start + i] = leftptr[start + i] - rightptr[start + i];
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Subtract(ref double left, double right, uint count)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ var rightarray = Enumerable.Repeat(right, (int)onecount).ToArray();
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref rightarray[0]);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref source, i);
|
|
|
+ tempdesc -= tempright;
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ leftptr[start + i] -= right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Subtract(ref double left, ref double right, uint count)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref right);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref source, i);
|
|
|
+ tempdesc -= Unsafe.Add(ref tempright, i);
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* rightptr = (double*)Unsafe.AsPointer(ref right);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ leftptr[start + i] -= rightptr[start + i];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public unsafe sealed class SIMDMultiply : IMultiply
|
|
@@ -454,6 +682,112 @@ namespace SIMDFxpConvert
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void Multiply(ref double left, double right, uint count, ref double result)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ ref var desc = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref result);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref desc, i);
|
|
|
+ tempdesc = Unsafe.Add(ref source, i) * right;
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* resultptr = (double*)Unsafe.AsPointer(ref result);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ resultptr[start + i] = leftptr[start + i] * right;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Multiply(ref double left, ref double right, uint count, ref double result)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ ref var desc = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref result);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref right);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref desc, i);
|
|
|
+ tempdesc = Unsafe.Add(ref source, i) * Unsafe.Add(ref tempright, i);
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* resultptr = (double*)Unsafe.AsPointer(ref result);
|
|
|
+ double* rightptr = (double*)Unsafe.AsPointer(ref right);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ resultptr[start + i] = leftptr[start + i] * rightptr[start + i];
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Multiply(ref double left, double right, uint count)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref source, i);
|
|
|
+ tempdesc *= right;
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ leftptr[start + i] *= right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Multiply(ref double left, ref double right, uint count)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref right);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref source, i);
|
|
|
+ tempdesc *= Unsafe.Add(ref tempright, i);
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* rightptr = (double*)Unsafe.AsPointer(ref right);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ leftptr[start + i] *= rightptr[start + i];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
public unsafe sealed class SIMDDivision : IDivision
|
|
|
{
|
|
@@ -558,5 +892,108 @@ namespace SIMDFxpConvert
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ public void Division(ref double left, double right, uint count, ref double result)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ ref var desc = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref result);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref desc, i);
|
|
|
+ tempdesc = Unsafe.Add(ref source, i) / right;
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* resultptr = (double*)Unsafe.AsPointer(ref result);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ resultptr[start + i] = leftptr[start + i] / right;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Division(ref double left, ref double right, uint count, ref double result)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ ref var desc = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref result);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref right);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref desc, i);
|
|
|
+ tempdesc = Unsafe.Add(ref source, i) / Unsafe.Add(ref tempright, i);
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* resultptr = (double*)Unsafe.AsPointer(ref result);
|
|
|
+ double* rightptr = (double*)Unsafe.AsPointer(ref right);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ resultptr[start + i] = leftptr[start + i] / rightptr[start + i];
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Division(ref double left, double right, uint count)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref source, i);
|
|
|
+ tempdesc /= right;
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ leftptr[start + i] /= right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Division(ref double left, ref double right, uint count)
|
|
|
+ {
|
|
|
+ if (count == 0) return;
|
|
|
+ ref var source = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref left);
|
|
|
+ uint onecount = (uint)(512 / (Unsafe.SizeOf<double>() * 8));
|
|
|
+ uint c = count / onecount;
|
|
|
+ uint c1 = count % onecount;
|
|
|
+ uint start = c * onecount;
|
|
|
+ ref var tempright = ref Unsafe.As<double, System.Runtime.Intrinsics.Vector512<double>>(ref right);
|
|
|
+ for (int i = 0; i < c; i++)
|
|
|
+ {
|
|
|
+ ref var tempdesc = ref Unsafe.Add(ref source, i);
|
|
|
+ tempdesc /= Unsafe.Add(ref tempright, i);
|
|
|
+ }
|
|
|
+ if (c1 > 0)
|
|
|
+ {
|
|
|
+ double* leftptr = (double*)Unsafe.AsPointer(ref left);
|
|
|
+ double* rightptr = (double*)Unsafe.AsPointer(ref right);
|
|
|
+ for (int i = 0; i < c1; i++)
|
|
|
+ {
|
|
|
+ leftptr[start + i] /= rightptr[start + i];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|