Browse Source

Merge pull request #426 from Aixile/master

Fix recursion issue of CacheObliviousMatrixMultiply
netstandard
Christoph Ruegg 10 years ago
committed by GitHub
parent
commit
c8d3b272ba
  1. 2
      src/Numerics/Providers/LinearAlgebra/ManagedLinearAlgebraProvider.Complex.cs
  2. 2
      src/Numerics/Providers/LinearAlgebra/ManagedLinearAlgebraProvider.Complex32.cs
  3. 2
      src/Numerics/Providers/LinearAlgebra/ManagedLinearAlgebraProvider.Double.cs
  4. 2
      src/Numerics/Providers/LinearAlgebra/ManagedLinearAlgebraProvider.Single.cs

2
src/Numerics/Providers/LinearAlgebra/ManagedLinearAlgebraProvider.Complex.cs

@ -666,7 +666,7 @@ namespace MathNet.Numerics.Providers.LinearAlgebra
/// <param name="first">Indicates if this is the first recursion.</param> /// <param name="first">Indicates if this is the first recursion.</param>
static void CacheObliviousMatrixMultiply(Transpose transposeA, Transpose transposeB, Complex alpha, Complex[] matrixA, int shiftArow, int shiftAcol, Complex[] matrixB, int shiftBrow, int shiftBcol, Complex[] result, int shiftCrow, int shiftCcol, int m, int n, int k, int constM, int constN, int constK, bool first) static void CacheObliviousMatrixMultiply(Transpose transposeA, Transpose transposeB, Complex alpha, Complex[] matrixA, int shiftArow, int shiftAcol, Complex[] matrixB, int shiftBrow, int shiftBcol, Complex[] result, int shiftCrow, int shiftCcol, int m, int n, int k, int constM, int constN, int constK, bool first)
{ {
if (m + n <= Control.ParallelizeOrder) if (m + n <= Control.ParallelizeOrder || m == 1 || n == 1 || k == 1)
{ {
if ((int) transposeA > 111 && (int) transposeB > 111) if ((int) transposeA > 111 && (int) transposeB > 111)
{ {

2
src/Numerics/Providers/LinearAlgebra/ManagedLinearAlgebraProvider.Complex32.cs

@ -663,7 +663,7 @@ namespace MathNet.Numerics.Providers.LinearAlgebra
/// <param name="first">Indicates if this is the first recursion.</param> /// <param name="first">Indicates if this is the first recursion.</param>
static void CacheObliviousMatrixMultiply(Transpose transposeA, Transpose transposeB, Complex32 alpha, Complex32[] matrixA, int shiftArow, int shiftAcol, Complex32[] matrixB, int shiftBrow, int shiftBcol, Complex32[] result, int shiftCrow, int shiftCcol, int m, int n, int k, int constM, int constN, int constK, bool first) static void CacheObliviousMatrixMultiply(Transpose transposeA, Transpose transposeB, Complex32 alpha, Complex32[] matrixA, int shiftArow, int shiftAcol, Complex32[] matrixB, int shiftBrow, int shiftBcol, Complex32[] result, int shiftCrow, int shiftCcol, int m, int n, int k, int constM, int constN, int constK, bool first)
{ {
if (m + n <= Control.ParallelizeOrder) if (m + n <= Control.ParallelizeOrder || m == 1 || n == 1 || k == 1)
{ {
if ((int) transposeA > 111 && (int) transposeB > 111) if ((int) transposeA > 111 && (int) transposeB > 111)
{ {

2
src/Numerics/Providers/LinearAlgebra/ManagedLinearAlgebraProvider.Double.cs

@ -658,7 +658,7 @@ namespace MathNet.Numerics.Providers.LinearAlgebra
/// <param name="first">Indicates if this is the first recursion.</param> /// <param name="first">Indicates if this is the first recursion.</param>
static void CacheObliviousMatrixMultiply(Transpose transposeA, Transpose transposeB, double alpha, double[] matrixA, int shiftArow, int shiftAcol, double[] matrixB, int shiftBrow, int shiftBcol, double[] result, int shiftCrow, int shiftCcol, int m, int n, int k, int constM, int constN, int constK, bool first) static void CacheObliviousMatrixMultiply(Transpose transposeA, Transpose transposeB, double alpha, double[] matrixA, int shiftArow, int shiftAcol, double[] matrixB, int shiftBrow, int shiftBcol, double[] result, int shiftCrow, int shiftCcol, int m, int n, int k, int constM, int constN, int constK, bool first)
{ {
if (m + n <= Control.ParallelizeOrder) if (m + n <= Control.ParallelizeOrder || m == 1 || n == 1 || k == 1)
{ {
if ((int) transposeA > 111 && (int) transposeB > 111) if ((int) transposeA > 111 && (int) transposeB > 111)
{ {

2
src/Numerics/Providers/LinearAlgebra/ManagedLinearAlgebraProvider.Single.cs

@ -658,7 +658,7 @@ namespace MathNet.Numerics.Providers.LinearAlgebra
/// <param name="first">Indicates if this is the first recursion.</param> /// <param name="first">Indicates if this is the first recursion.</param>
static void CacheObliviousMatrixMultiply(Transpose transposeA, Transpose transposeB, float alpha, float[] matrixA, int shiftArow, int shiftAcol, float[] matrixB, int shiftBrow, int shiftBcol, float[] result, int shiftCrow, int shiftCcol, int m, int n, int k, int constM, int constN, int constK, bool first) static void CacheObliviousMatrixMultiply(Transpose transposeA, Transpose transposeB, float alpha, float[] matrixA, int shiftArow, int shiftAcol, float[] matrixB, int shiftBrow, int shiftBcol, float[] result, int shiftCrow, int shiftCcol, int m, int n, int k, int constM, int constN, int constK, bool first)
{ {
if (m + n <= Control.ParallelizeOrder) if (m + n <= Control.ParallelizeOrder || m == 1 || n == 1 || k == 1)
{ {
if ((int) transposeA > 111 && (int) transposeB > 111) if ((int) transposeA > 111 && (int) transposeB > 111)
{ {

Loading…
Cancel
Save