Browse Source

Native: uniform test compilation symbols

cuda
Christoph Ruegg 12 years ago
parent
commit
c0a94944d6
  1. 4
      src/UnitTests/UnitTests-CUDA.csproj
  2. 4
      src/UnitTests/UnitTests-MKL.csproj
  3. 5
      src/UnitTests/UseLinearAlgebraProvider.cs

4
src/UnitTests/UnitTests-CUDA.csproj

@ -16,7 +16,7 @@
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE;CUDA</DefineConstants>
<DefineConstants>TRACE;NATIVE;CUDA</DefineConstants>
<OutputPath>..\..\out\CUDA\Windows\</OutputPath>
<IntermediateOutputPath>..\..\obj\CUDA\Windows\x86\</IntermediateOutputPath>
<BaseIntermediateOutputPath>..\..\obj\CUDA\Windows\x86\</BaseIntermediateOutputPath>
@ -28,7 +28,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>TRACE;DEBUG;CUDA</DefineConstants>
<DefineConstants>TRACE;DEBUG;NATIVE;CUDA</DefineConstants>
<OutputPath>..\..\out\CUDA\Windows\</OutputPath>
<IntermediateOutputPath>..\..\obj\CUDA\Windows\x86\</IntermediateOutputPath>
<BaseIntermediateOutputPath>..\..\obj\CUDA\Windows\x86\</BaseIntermediateOutputPath>

4
src/UnitTests/UnitTests-MKL.csproj

@ -16,7 +16,7 @@
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE;NATIVE</DefineConstants>
<DefineConstants>TRACE;NATIVE;MKL</DefineConstants>
<OutputPath>..\..\out\MKL\Windows\</OutputPath>
<IntermediateOutputPath>..\..\obj\MKL\Windows\x86\</IntermediateOutputPath>
<BaseIntermediateOutputPath>..\..\obj\MKL\Windows\x86\</BaseIntermediateOutputPath>
@ -28,7 +28,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>TRACE;DEBUG;NATIVE</DefineConstants>
<DefineConstants>TRACE;DEBUG;NATIVE;MKL</DefineConstants>
<OutputPath>..\..\out\MKL\Windows\</OutputPath>
<IntermediateOutputPath>..\..\obj\MKL\Windows\x86\</IntermediateOutputPath>
<BaseIntermediateOutputPath>..\..\obj\MKL\Windows\x86\</BaseIntermediateOutputPath>

5
src/UnitTests/UseLinearAlgebraProvider.cs

@ -39,10 +39,11 @@ namespace MathNet.Numerics.UnitTests
public void BeforeTest(TestDetails testDetails)
{
#if !NET35 && NATIVE
#if MKL
Control.UseNativeMKL();
#endif
#if CUDA
#elif CUDA
Control.UseNativeCUDA();
#endif
#endif
}

Loading…
Cancel
Save