Renamed ReadOnlyBuffer to ConstantBuffer
このコミットが含まれているのは:
1 親
eb44113990
コミット
51f1e3e020
9ファイル変更
+36
-36
検索条件に一致するファイルはありません
@@ -26,7 +26,7 @@ namespace ComputeSharp.NetCore.Tests
|
||||
{
|
||||
float[] array = Enumerable.Range(0, 4096).Select(i => (float)i).ToArray();
|
||||
|
||||
using ReadOnlyBuffer<float> buffer = Gpu.Default.AllocateReadOnlyBuffer(array);
|
||||
using ConstantBuffer<float> buffer = Gpu.Default.AllocateConstantBuffer(array);
|
||||
float[] result = buffer.GetData();
|
||||
|
||||
Assert.IsTrue(array.AsSpan().ContentEquals(result));
|
||||
@@ -52,7 +52,7 @@ namespace ComputeSharp.NetCore.Tests
|
||||
{
|
||||
float[] array = Enumerable.Range(0, 4096).Select(i => (float)i).ToArray();
|
||||
|
||||
using ReadOnlyBuffer<float> sourceBuffer = Gpu.Default.AllocateReadOnlyBuffer(array);
|
||||
using ConstantBuffer<float> sourceBuffer = Gpu.Default.AllocateConstantBuffer(array);
|
||||
using ReadWriteBuffer<float> destinationBuffer = Gpu.Default.AllocateReadWriteBuffer(sourceBuffer);
|
||||
|
||||
float[] sourceResult = sourceBuffer.GetData();
|
||||
@@ -68,7 +68,7 @@ namespace ComputeSharp.NetCore.Tests
|
||||
float[] array = Enumerable.Range(0, 4096).Select(i => (float)i).ToArray();
|
||||
|
||||
using ReadWriteBuffer<float> sourceBuffer = Gpu.Default.AllocateReadWriteBuffer(array);
|
||||
using ReadOnlyBuffer<float> destinationBuffer = Gpu.Default.AllocateReadOnlyBuffer(sourceBuffer);
|
||||
using ConstantBuffer<float> destinationBuffer = Gpu.Default.AllocateConstantBuffer(sourceBuffer);
|
||||
|
||||
float[] sourceResult = sourceBuffer.GetData();
|
||||
float[] destinationResult = destinationBuffer.GetData();
|
||||
@@ -82,8 +82,8 @@ namespace ComputeSharp.NetCore.Tests
|
||||
{
|
||||
float[] array = Enumerable.Range(0, 4096).Select(i => (float)i).ToArray();
|
||||
|
||||
using ReadOnlyBuffer<float> sourceBuffer = Gpu.Default.AllocateReadOnlyBuffer(array);
|
||||
using ReadOnlyBuffer<float> destinationBuffer = Gpu.Default.AllocateReadOnlyBuffer(sourceBuffer);
|
||||
using ConstantBuffer<float> sourceBuffer = Gpu.Default.AllocateConstantBuffer(array);
|
||||
using ConstantBuffer<float> destinationBuffer = Gpu.Default.AllocateConstantBuffer(sourceBuffer);
|
||||
|
||||
float[] sourceResult = sourceBuffer.GetData();
|
||||
float[] destinationResult = destinationBuffer.GetData();
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace ComputeSharp.NetCore.Tests
|
||||
{
|
||||
float[] source = Enumerable.Range(0, 100).Select(i => (float)i).ToArray();
|
||||
|
||||
using ReadOnlyBuffer<float> input = Gpu.Default.AllocateReadOnlyBuffer(source);
|
||||
using ConstantBuffer<float> input = Gpu.Default.AllocateConstantBuffer(source);
|
||||
using ReadWriteBuffer<float> buffer = Gpu.Default.AllocateReadWriteBuffer<float>(source.Length);
|
||||
|
||||
Action<ThreadIds> action = id => buffer[id.X] = input[id.X];
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする