From 83ef8bcd12b4e8122e73b4a4d5f7e39f48725ce1 Mon Sep 17 00:00:00 2001 From: adrien Date: Tue, 19 May 2026 21:35:52 +0200 Subject: [PATCH] Renamed ProcessDef to COmputeDef --- README.md | 2 +- examples/add.zig | 2 +- src/GpuCompute.zig | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8159bdc..bd63fe3 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ pub fn main(init: std.process.Init) !void { try buf_a.load(f16, data_a); try buf_b.load(f16, data_b); - // 7. Dispatch the Compute Process + // 7. Dispatch the Compute try add_cp.run(gloc, .{ buf_a, buf_b, buf_out }); // 8. Map and copy the resulting buffer back to the CPU diff --git a/examples/add.zig b/examples/add.zig index e3c4b84..46c0176 100644 --- a/examples/add.zig +++ b/examples/add.zig @@ -54,7 +54,7 @@ pub fn main(init: std.process.Init) !void { try buf_a.load(f16, data_a); try buf_b.load(f16, data_b); - // 7. Dispatch the Compute Process + // 7. Dispatch the Compute try add_cp.run(gloc, .{ buf_a, buf_b, buf_out }); // 8. Map and copy the resulting buffer back to the CPU diff --git a/src/GpuCompute.zig b/src/GpuCompute.zig index 903cde1..6838fa9 100644 --- a/src/GpuCompute.zig +++ b/src/GpuCompute.zig @@ -10,7 +10,7 @@ pub const Binding = struct { element_size: u32 = 0, }; -pub const ProcessDef = struct { +pub const ComputeDef = struct { bindings: []const Binding, workgroup_size: u32 = 256, max_workgroups: u32 = 65535, @@ -20,9 +20,9 @@ pub const ProcessDef = struct { }; pip: c.WGPUComputePipeline, -def: ProcessDef, +def: ComputeDef, -pub fn init(device: GpuDevice, wgsl: []const u8, def: ProcessDef) !@This() { +pub fn init(device: GpuDevice, wgsl: []const u8, def: ComputeDef) !@This() { var wgsl_src = c.WGPUShaderSourceWGSL{ .chain = .{ .sType = c.WGPUSType_ShaderSourceWGSL }, .code = sv(wgsl),