Merge pull request #8 from Sergio0694/refactoring_solution-structure

Solution structure refactoring
このコミットが含まれているのは:
Sergio Pedri authored and GitHub committed 2019-08-12 17:06:42 +02:00
コミット 9ad9d6d84b
4ファイル変更
+24 -14

検索条件に一致するファイルはありません

@@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ComputeSharp\ComputeSharp.csproj" />
<ProjectReference Include="..\..\src\ComputeSharp\ComputeSharp.csproj" />
</ItemGroup>
</Project>
@@ -2,9 +2,8 @@
using System.Linq;
using ComputeSharp;
using ComputeSharp.Graphics.Buffers;
using ComputeSharp.Graphics.Buffers.Extensions;
namespace DirectX12ComputeShaderSample
namespace NetCoreComputeShaderSample
{
public class Program
{
@@ -19,7 +18,11 @@ namespace DirectX12ComputeShaderSample
array[i] = i + 1;
}
using ReadWriteBuffer<float> gpuBuffer = Gpu.Default.AllocateReadWriteBuffer(array.AsSpan());
// Print the initial matrix
Console.WriteLine("Before:");
PrintMatrix(array, width, height);
using ReadWriteBuffer<float> gpuBuffer = Gpu.Default.AllocateReadWriteBuffer(array);
// Shader body
Action<ThreadIds> action = id =>
@@ -31,14 +34,10 @@ namespace DirectX12ComputeShaderSample
// Run the shader
Gpu.Default.For(100, action);
// Print matrix
// Get the data back
gpuBuffer.GetData(array);
Console.WriteLine("Before:");
PrintMatrix(array, width, height);
gpuBuffer.GetData(array.AsSpan());
Console.WriteLine();
// Print the updated matrix
Console.WriteLine("After:");
PrintMatrix(array, width, height);
}
+3 -2
ファイルの表示
@@ -1,9 +1,10 @@
using System;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.Graphics;
using ComputeSharp.Graphics.Buffers;
namespace ComputeSharp.Graphics.Buffers.Extensions
namespace ComputeSharp
{
/// <summary>
/// A <see langword="class"/> with extension methods for the <see cref="GraphicsDevice"/> type to allocate buffers
+11 -1
ファイルの表示
@@ -9,7 +9,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Shaders", "Com
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp", "ComputeSharp\ComputeSharp.csproj", "{314EB353-E7E3-4146-8111-685CC83EC1DE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DirectX12ComputeShaderSample", "DirectX12ComputeShaderSample\DirectX12ComputeShaderSample.csproj", "{7A48A85D-8866-4DED-A404-653ED09BF396}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCoreComputeShaderSample", "..\samples\NetCoreComputeShaderSample\NetCoreComputeShaderSample.csproj", "{7A48A85D-8866-4DED-A404-653ED09BF396}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_SolutionItems", "_SolutionItems", "{1A9C4108-F61A-4ABE-B5CF-F524521EAE2D}"
ProjectSection(SolutionItems) = preProject
..\.gitignore = ..\.gitignore
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -55,6 +62,9 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7A48A85D-8866-4DED-A404-653ED09BF396} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4664C5E3-0340-4E22-BCFD-98AAEDF5F2DC}
EndGlobalSection