From 8537b6657840a5cd689f8f287bdba243ea7c1701 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 17 Aug 2019 23:24:45 +0200 Subject: [PATCH] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e17e67f..e64932e4 100644 --- a/README.md +++ b/README.md @@ -53,18 +53,18 @@ int height = 10, width = 10; float[] x = new float[height * width]; // Array to sum to y float[] y = new float[height * width]; // Result array (assume both had some values) -using ReadOnlyBuffer xBuffer = Gpu.Default.AllocateConstantBuffer(x); +using ReadOnlyBuffer xBuffer = Gpu.Default.AllocateReadOnlyBuffer(x); using ReadWriteBuffer yBuffer = Gpu.Default.AllocateReadWriteBuffer(y); // Shader body -void Main(ThreadIds id) +void Kernel(ThreadIds id) { uint offset = id.X + id.Y * (uint)width; yBuffer[offset] += xBuffer[offset]; } // Run the shader -Gpu.Default.For(width, height, Main); +Gpu.Default.For(width, height, Kernel); // Get the data back and write it to the y array yBuffer.GetData(y);