Skip to content

Commit

Permalink
Added VS integration of check styles to all projects and fixed warnin…
Browse files Browse the repository at this point in the history
…gs in ttinclude files. (#517)
  • Loading branch information
MoFtZ authored Jul 1, 2021
1 parent 4da2a29 commit 386e1d4
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,6 @@
<DependentUpon>Configurations.tt</DependentUpon>
</Compile>
</ItemGroup>

<Import Project="..\ILGPU\Properties\ILGPU.CheckStyles.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,6 @@
<DependentUpon>Configurations.tt</DependentUpon>
</Compile>
</ItemGroup>

<Import Project="..\ILGPU\Properties\ILGPU.CheckStyles.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,6 @@
<DependentUpon>Configurations.tt</DependentUpon>
</Compile>
</ItemGroup>

<Import Project="..\ILGPU\Properties\ILGPU.CheckStyles.targets" />
</Project>
2 changes: 2 additions & 0 deletions Src/ILGPU.Algorithms.Tests/ILGPU.Algorithms.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -336,4 +336,6 @@
<ItemGroup>
<Folder Include="Generic\" />
</ItemGroup>

<Import Project="..\ILGPU\Properties\ILGPU.CheckStyles.targets" />
</Project>
1 change: 1 addition & 0 deletions Src/ILGPU.Algorithms/ILGPU.Algorithms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -287,4 +287,5 @@
</ItemGroup>

<Import Project="Properties\ILGPU.Algorithms.nuspec.targets" />
<Import Project="..\ILGPU\Properties\ILGPU.CheckStyles.targets" />
</Project>
21 changes: 18 additions & 3 deletions Src/ILGPU.Algorithms/Runtime/Cuda/CuBlasMappings.ttinclude
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ public static IEnumerable<(T, string, string)> GetBlasMapping<T>(params T[] valu
}
}

public static IEnumerable<(string, T, string, string)> GetBlasMapping<T>(params (string, T[])[] bindings)
public static IEnumerable<(string, T, string, string)> GetBlasMapping<T>(
params (string, T[])[] bindings)
{
foreach (var (entry, values) in bindings)
{
Expand All @@ -339,11 +340,25 @@ public static IEnumerable<(string, T, string, string)> GetBlasMapping<T>(params
}
}

public static IEnumerable<(string, T, string, string, string, Func<string, string>, string)> GetBlasMappingHostDevice<T>(
public static IEnumerable<(
string,
T,
string,
string,
string,
Func<string, string>,
string)> GetBlasMappingHostDevice<T>(
params (string, T[])[] bindings) =>
GetBlasMappingHostDevice(false, bindings);

public static IEnumerable<(string, T, string, string, string, Func<string, string>, string)> GetBlasMappingHostDevice<T>(
public static IEnumerable<(
string,
T,
string,
string,
string,
Func<string, string>,
string)> GetBlasMappingHostDevice<T>(
bool byRef,
params (string, T[])[] bindings)
{
Expand Down
18 changes: 16 additions & 2 deletions Src/ILGPU.Algorithms/XMath/Cordic.ttinclude
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,22 @@
<#
var operations = new []
{
new { DataType = "float", ValueSuffix = "f", Iterations = 24, Format = "E9", XMathSuffix = "" },
new { DataType = "double", ValueSuffix = "", Iterations = 53, Format = "E17", XMathSuffix = "D" },
new
{
DataType = "float",
ValueSuffix = "f",
Iterations = 24,
Format = "E9",
XMathSuffix = ""
},
new
{
DataType = "double",
ValueSuffix = "",
Iterations = 53,
Format = "E17",
XMathSuffix = "D"
},
};

var maxIterations = operations.Max(x => x.Iterations);
Expand Down
1 change: 1 addition & 0 deletions Src/ILGPU.Tests.CPU/ILGPU.Tests.CPU.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@
</Compile>
</ItemGroup>

<Import Project="..\ILGPU\Properties\ILGPU.CheckStyles.targets" />
</Project>
1 change: 1 addition & 0 deletions Src/ILGPU.Tests.Cuda/ILGPU.Tests.Cuda.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@
</Compile>
</ItemGroup>

<Import Project="..\ILGPU\Properties\ILGPU.CheckStyles.targets" />
</Project>
1 change: 1 addition & 0 deletions Src/ILGPU.Tests.OpenCL/ILGPU.Tests.OpenCL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@
</Compile>
</ItemGroup>

<Import Project="..\ILGPU\Properties\ILGPU.CheckStyles.targets" />
</Project>
1 change: 1 addition & 0 deletions Src/ILGPU.Tests/ILGPU.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,5 @@
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>

<Import Project="..\ILGPU\Properties\ILGPU.CheckStyles.targets" />
</Project>
3 changes: 2 additions & 1 deletion Src/ILGPU/Static/TypeInformation.ttinclude
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ public MathOp[] GetBinaryMathOps(string rootPath) =>
public MathOp[] GetTernaryMathOps(string rootPath) =>
MathOperations.Load(rootPath, "TernaryMathOperations.xml");

// FP16 raw implementations that can be implemented without the use of emulated FP32 operations.
// FP16 raw implementations that can be implemented without the use of emulated FP32
// operations.
public static readonly (string, string)[] FP16ImplementationMethods =
{
("Abs", "Abs"),
Expand Down

0 comments on commit 386e1d4

Please sign in to comment.