Browse Source

made UseLinearAlgebraProvider an assembly attribute so it applies to all tests

commented on the norm calcuation in the MKL provider. there seems to be a bug in zlange. contacted intel
v2
Marcus Cuda 14 years ago
parent
commit
53294d32e2
  1. 1
      src/NativeWrappers/Windows/MKLWrapperTests/MKLWrapperTests.csproj
  2. 4
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Common.cs
  3. 2
      src/UnitTests/LinearAlgebraProviderTests/Complex/LinearAlgebraProviderTests.cs
  4. 2
      src/UnitTests/LinearAlgebraProviderTests/Complex32/LinearAlgebraProviderTests.cs
  5. 2714
      src/UnitTests/LinearAlgebraProviderTests/Double/LinearAlgebraProviderTests.cs
  6. 2
      src/UnitTests/LinearAlgebraProviderTests/Single/LinearAlgebraProviderTests.cs
  7. 3
      src/UnitTests/Properties/AssemblyInfo.cs
  8. 13
      src/UnitTests/UseLinearAlgebraProvider.cs

1
src/NativeWrappers/Windows/MKLWrapperTests/MKLWrapperTests.csproj

@ -527,6 +527,7 @@
<ItemGroup>
<None Include="..\..\..\..\data\Matlab\sparse-small.mat">
<Link>data\Matlab\sparse-small.mat</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\..\UnitTests\Properties\Settings.settings">
<Link>Properties\Settings.settings</Link>

4
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Common.cs

@ -40,7 +40,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Mkl
/// </summary>
public partial class MklLinearAlgebraProvider : ManagedLinearAlgebraProvider
{
/// <summary>
/* /// <summary>
/// Computes the requested <see cref="Norm"/> of the matrix.
/// </summary>
/// <param name="norm">The type of norm to compute.</param>
@ -358,6 +358,6 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Mkl
}
return SafeNativeMethods.z_matrix_norm((byte)norm, rows, columns, matrix, work);
}
}*/
}
}

2
src/UnitTests/LinearAlgebraProviderTests/Complex/LinearAlgebraProviderTests.cs

@ -38,7 +38,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex
/// <summary>
/// Base class for linear algebra provider tests.
/// </summary>
[TestFixture, UseLinearAlgebraProvider]
[TestFixture]
public class LinearAlgebraProviderTests
{
/// <summary>

2
src/UnitTests/LinearAlgebraProviderTests/Complex32/LinearAlgebraProviderTests.cs

@ -39,7 +39,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex32
/// <summary>
/// Base class for linear algebra provider tests.
/// </summary>
[TestFixture, UseLinearAlgebraProvider]
[TestFixture]
public class LinearAlgebraProviderTests
{
/// <summary>

2714
src/UnitTests/LinearAlgebraProviderTests/Double/LinearAlgebraProviderTests.cs

File diff suppressed because it is too large

2
src/UnitTests/LinearAlgebraProviderTests/Single/LinearAlgebraProviderTests.cs

@ -38,7 +38,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Single
/// <summary>
/// Base class for linear algebra provider tests.
/// </summary>
[TestFixture, UseLinearAlgebraProvider]
[TestFixture]
public class LinearAlgebraProviderTests
{
/// <summary>

3
src/UnitTests/Properties/AssemblyInfo.cs

@ -1,5 +1,6 @@
using System.Reflection;
using System.Runtime.InteropServices;
using MathNet.Numerics.UnitTests;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
@ -31,3 +32,5 @@ using System.Runtime.InteropServices;
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: UseLinearAlgebraProvider]

13
src/UnitTests/UseLinearAlgebraProvider.cs

@ -28,14 +28,17 @@
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
using System;
using NUnit.Framework;
namespace MathNet.Numerics.UnitTests
{
public class UseLinearAlgebraProvider : TestActionAttribute
[AttributeUsage(AttributeTargets.Assembly)]
public class UseLinearAlgebraProvider : Attribute, ITestAction
{
public override void BeforeTest(TestDetails testDetails)
public void BeforeTest(TestDetails testDetails)
{
Console.WriteLine("hhhhhhhhhhhhhhhhhhhhhhh");
var provider = Properties.Settings.Default.LinearAlgebraProvider.ToLowerInvariant();
if (provider.Contains("mkl"))
@ -44,7 +47,11 @@ namespace MathNet.Numerics.UnitTests
}
}
public override ActionTargets Targets
public void AfterTest(TestDetails details)
{
}
public ActionTargets Targets
{
get { return ActionTargets.Suite; }
}

Loading…
Cancel
Save