Merge pull request #681 from Sergio0694/dev/more-collection-expressions
Use more collection expressions in samples and tests
このコミットが含まれているのは:
6ファイル変更
+6
-6
検索条件に一致するファイルはありません
@@ -27,7 +27,7 @@ internal static class Formatting
|
||||
|
||||
for (int i = 0; i < height; i++)
|
||||
{
|
||||
float[] row = array.AsSpan(i * width, width).ToArray();
|
||||
float[] row = [.. array.AsSpan(i * width, width)];
|
||||
string text = string.Join(",", row.Select(x => x.ToString(CultureInfo.InvariantCulture).PadLeft(numberWidth)));
|
||||
|
||||
Console.WriteLine(text);
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Linq;
|
||||
using ComputeSharp;
|
||||
using ComputeSharp.Sample;
|
||||
|
||||
float[] array = Enumerable.Range(1, 100).Select(static i => (float)i).ToArray();
|
||||
float[] array = [.. Enumerable.Range(1, 100)];
|
||||
|
||||
// Create the graphics buffer
|
||||
using ReadWriteBuffer<float> gpuBuffer = GraphicsDevice.GetDefault().AllocateReadWriteBuffer(array);
|
||||
|
||||
@@ -6,7 +6,7 @@ using ComputeSharp.Interop;
|
||||
|
||||
[assembly: SupportedOSPlatform("windows6.2")]
|
||||
|
||||
float[] array = Enumerable.Range(1, 100).Select(static i => (float)i).ToArray();
|
||||
float[] array = [.. Enumerable.Range(1, 100)];
|
||||
|
||||
// Create the graphics buffer
|
||||
using ReadWriteBuffer<float> gpuBuffer = GraphicsDevice.GetDefault().AllocateReadWriteBuffer(array);
|
||||
|
||||
@@ -5,7 +5,7 @@ using ComputeSharp;
|
||||
|
||||
[assembly: SupportedOSPlatform("windows6.2")]
|
||||
|
||||
float[] array = Enumerable.Range(1, 100).Select(static i => (float)i).ToArray();
|
||||
float[] array = [.. Enumerable.Range(1, 100)];
|
||||
|
||||
// Create the graphics buffer
|
||||
using ReadWriteBuffer<float> gpuBuffer = GraphicsDevice.GetDefault().AllocateReadWriteBuffer(array);
|
||||
|
||||
@@ -5,7 +5,7 @@ using ComputeSharp;
|
||||
|
||||
[assembly: SupportedOSPlatform("windows6.2")]
|
||||
|
||||
float[] array = Enumerable.Range(1, 100).Select(static i => (float)i).ToArray();
|
||||
float[] array = [.. Enumerable.Range(1, 100)];
|
||||
|
||||
// Create the graphics buffer
|
||||
using ReadWriteBuffer<float> gpuBuffer = GraphicsDevice.GetDefault().AllocateReadWriteBuffer(array);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using ComputeSharp;
|
||||
|
||||
float[] numbers = Enumerable.Range(0, 128).Select(i => (float)i).ToArray();
|
||||
float[] numbers = [.. Enumerable.Range(0, 128)];
|
||||
|
||||
using GraphicsDevice device = GraphicsDevice.GetDefault();
|
||||
using ReadWriteBuffer<float> buffer = device.AllocateReadWriteBuffer(numbers);
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする