fixing FFI, removing division by zero error, fixing fmod/rem
Build / build (push) Successful in 1m24s
Test / build (push) Successful in 9m59s

This commit is contained in:
2026-06-30 01:50:21 +02:00
parent e49383f07e
commit b79282878e
7 changed files with 188 additions and 62 deletions
+2 -1
View File
@@ -21,7 +21,6 @@ const Self = @This();
pub const RuntimeError = error{
Barrier,
DivisionByZero,
InvalidEntryPoint,
InvalidSpirV,
InvalidValueType,
@@ -428,6 +427,8 @@ pub fn setDerivativeFromMemory(self: *Self, allocator: std.mem.Allocator, result
var dx_value = try Value.init(allocator, self.results, target_type, false);
defer dx_value.deinit(allocator);
const memory_size = try dx_value.getPlainMemorySize();
if (dx.len < memory_size or dy.len < memory_size) return RuntimeError.OutOfBounds;
_ = try dx_value.write(dx);
var dy_value = try Value.init(allocator, self.results, target_type, false);