|
|
@ -70,7 +70,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra |
|
|
{ |
|
|
{ |
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
{ |
|
|
{ |
|
|
CommonParallel.For(0, y.Length, (a, b) => |
|
|
CommonParallel.For(0, y.Length, 4096, (a, b) => |
|
|
{ |
|
|
{ |
|
|
for (int i = a; i < b; i++) |
|
|
for (int i = a; i < b; i++) |
|
|
{ |
|
|
{ |
|
|
@ -90,7 +90,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra |
|
|
{ |
|
|
{ |
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
{ |
|
|
{ |
|
|
CommonParallel.For(0, y.Length, (a, b) => |
|
|
CommonParallel.For(0, y.Length, 4096, (a, b) => |
|
|
{ |
|
|
{ |
|
|
for (int i = a; i < b; i++) |
|
|
for (int i = a; i < b; i++) |
|
|
{ |
|
|
{ |
|
|
@ -134,7 +134,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra |
|
|
{ |
|
|
{ |
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
{ |
|
|
{ |
|
|
CommonParallel.For(0, x.Length, (a, b) => |
|
|
CommonParallel.For(0, x.Length, 4096, (a, b) => |
|
|
{ |
|
|
{ |
|
|
for (int i = a; i < b; i++) |
|
|
for (int i = a; i < b; i++) |
|
|
{ |
|
|
{ |
|
|
@ -220,7 +220,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra |
|
|
|
|
|
|
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
{ |
|
|
{ |
|
|
CommonParallel.For(0, y.Length, (a, b) => |
|
|
CommonParallel.For(0, y.Length, 4096, (a, b) => |
|
|
{ |
|
|
{ |
|
|
for (int i = a; i < b; i++) |
|
|
for (int i = a; i < b; i++) |
|
|
{ |
|
|
{ |
|
|
@ -271,7 +271,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra |
|
|
|
|
|
|
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
{ |
|
|
{ |
|
|
CommonParallel.For(0, y.Length, (a, b) => |
|
|
CommonParallel.For(0, y.Length, 4096, (a, b) => |
|
|
{ |
|
|
{ |
|
|
for (int i = a; i < b; i++) |
|
|
for (int i = a; i < b; i++) |
|
|
{ |
|
|
{ |
|
|
@ -322,7 +322,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra |
|
|
|
|
|
|
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
{ |
|
|
{ |
|
|
CommonParallel.For(0, y.Length, (a, b) => |
|
|
CommonParallel.For(0, y.Length, 4096, (a, b) => |
|
|
{ |
|
|
{ |
|
|
for (int i = a; i < b; i++) |
|
|
for (int i = a; i < b; i++) |
|
|
{ |
|
|
{ |
|
|
@ -373,7 +373,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra |
|
|
|
|
|
|
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
if (Control.ParallelizeOperation(x.Length)) |
|
|
{ |
|
|
{ |
|
|
CommonParallel.For(0, y.Length, (a, b) => |
|
|
CommonParallel.For(0, y.Length, 4096, (a, b) => |
|
|
{ |
|
|
{ |
|
|
for (int i = a; i < b; i++) |
|
|
for (int i = a; i < b; i++) |
|
|
{ |
|
|
{ |
|
|
@ -1724,7 +1724,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
a[index] = -1.0f / scale; |
|
|
a[index] = -1.0f / scale; |
|
|
CommonParallel.For(0, rowCount - row, (u, v) => |
|
|
CommonParallel.For(0, rowCount - row, 4096, (u, v) => |
|
|
{ |
|
|
{ |
|
|
for (int i = u; i < v; i++) |
|
|
for (int i = u; i < v; i++) |
|
|
{ |
|
|
{ |
|
|
@ -1734,7 +1734,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra |
|
|
work[tmp] += 1.0f; |
|
|
work[tmp] += 1.0f; |
|
|
|
|
|
|
|
|
var s = (float)Math.Sqrt(1.0 / work[tmp]); |
|
|
var s = (float)Math.Sqrt(1.0 / work[tmp]); |
|
|
CommonParallel.For(0, rowCount - row, (u, v) => |
|
|
CommonParallel.For(0, rowCount - row, 4096, (u, v) => |
|
|
{ |
|
|
{ |
|
|
for (int i = u; i < v; i++) |
|
|
for (int i = u; i < v; i++) |
|
|
{ |
|
|
{ |
|
|
|